Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Proofed the 1.6 release notes

  • Loading branch information...
commit bb863faecd3e1d785933bce7cef7e4b4b28dc3d5 1 parent b00c637
Tim Graham authored
2  docs/ref/class-based-views/mixins-editing.txt
@@ -125,7 +125,7 @@ ModelFormMixin
125 125
 
126 126
         This is a required attribute if you are generating the form class
127 127
         automatically (e.g. using ``model``). Omitting this attribute will
128  
-        result in all fields being used, but this behaviour is deprecated
  128
+        result in all fields being used, but this behavior is deprecated
129 129
         and will be removed in Django 1.8.
130 130
 
131 131
     .. attribute:: success_url
5  docs/ref/contrib/admin/index.txt
@@ -1026,8 +1026,9 @@ subclass::
1026 1026
         Performs a full-text match. This is like the default search method but
1027 1027
         uses an index. Currently this is only available for MySQL.
1028 1028
 
1029  
-    If you need to customize search you can use :meth:`ModelAdmin.get_search_results` to provide additional or alternate
1030  
-    search behaviour.
  1029
+    If you need to customize search you can use
  1030
+    :meth:`ModelAdmin.get_search_results` to provide additional or alternate
  1031
+    search behavior.
1031 1032
 
1032 1033
 Custom template options
1033 1034
 ~~~~~~~~~~~~~~~~~~~~~~~
34  docs/ref/contrib/syndication.txt
@@ -137,25 +137,29 @@ into those elements.
137 137
 
138 138
   See `a complex example`_ below that uses a description template.
139 139
 
140  
-  There is also a way to pass additional information to title and description
141  
-  templates, if you need to supply more than the two variables mentioned
142  
-  before. You can provide your implementation of ``get_context_data`` method
143  
-  in your Feed subclass. For example::
  140
+  .. method:: Feed.get_context_data(self, **kwargs)
144 141
 
145  
-    from mysite.models import Article
146  
-    from django.contrib.syndication.views import Feed
  142
+    .. versionadded:: 1.6
147 143
 
148  
-    class ArticlesFeed(Feed):
149  
-        title = "My articles"
150  
-        description_template = "feeds/articles.html"
  144
+      There is also a way to pass additional information to title and description
  145
+      templates, if you need to supply more than the two variables mentioned
  146
+      before. You can provide your implementation of ``get_context_data`` method
  147
+      in your ``Feed`` subclass. For example::
151 148
 
152  
-        def items(self):
153  
-            return Article.objects.order_by('-pub_date')[:5]
  149
+        from mysite.models import Article
  150
+        from django.contrib.syndication.views import Feed
154 151
 
155  
-        def get_context_data(self, **kwargs):
156  
-            context = super(ArticlesFeed, self).get_context_data(**kwargs)
157  
-            context['foo'] = 'bar'
158  
-            return context
  152
+        class ArticlesFeed(Feed):
  153
+            title = "My articles"
  154
+            description_template = "feeds/articles.html"
  155
+
  156
+            def items(self):
  157
+                return Article.objects.order_by('-pub_date')[:5]
  158
+
  159
+            def get_context_data(self, **kwargs):
  160
+                context = super(ArticlesFeed, self).get_context_data(**kwargs)
  161
+                context['foo'] = 'bar'
  162
+                return context
159 163
 
160 164
   And the template:
161 165
 
2  docs/ref/databases.txt
@@ -135,6 +135,8 @@ configuration in :setting:`DATABASES`::
135 135
 Since Django 1.6, autocommit is turned on by default. This configuration is
136 136
 ignored and can be safely removed.
137 137
 
  138
+.. _database-isolation-level:
  139
+
138 140
 Isolation level
139 141
 ---------------
140 142
 
2  docs/ref/forms/models.txt
@@ -33,7 +33,7 @@ Model Form Functions
33 33
     ``fields`` or ``exclude``, or the corresponding attributes on the form's
34 34
     inner ``Meta`` class. See :ref:`modelforms-selecting-fields` for more
35 35
     information. Omitting any definition of the fields to use will result in all
36  
-    fields being used, but this behaviour is deprecated.
  36
+    fields being used, but this behavior is deprecated.
37 37
 
38 38
     The ``localized_fields`` parameter was added.
39 39
 
8  docs/ref/settings.txt
@@ -344,9 +344,9 @@ CSRF_COOKIE_HTTPONLY
344 344
 
345 345
 Default: ``False``
346 346
 
347  
-Whether to use HttpOnly flag on the CSRF cookie. If this is set to ``True``,
348  
-client-side JavaScript will not to be able to access the CSRF cookie. See
349  
-:setting:`SESSION_COOKIE_HTTPONLY` for details on HttpOnly.
  347
+Whether to use ``HttpOnly`` flag on the CSRF cookie. If this is set to
  348
+``True``, client-side JavaScript will not to be able to access the CSRF cookie.
  349
+See :setting:`SESSION_COOKIE_HTTPONLY` for details on ``HttpOnly``.
350 350
 
351 351
 .. setting:: CSRF_COOKIE_NAME
352 352
 
@@ -2315,7 +2315,7 @@ SESSION_COOKIE_HTTPONLY
2315 2315
 
2316 2316
 Default: ``True``
2317 2317
 
2318  
-Whether to use HTTPOnly flag on the session cookie. If this is set to
  2318
+Whether to use ``HTTPOnly`` flag on the session cookie. If this is set to
2319 2319
 ``True``, client-side JavaScript will not to be able to access the
2320 2320
 session cookie.
2321 2321
 
93  docs/releases/1.6.txt
@@ -79,9 +79,9 @@ location of tests. The previous runner
79 79
 :setting:`INSTALLED_APPS`.
80 80
 
81 81
 The new runner (``django.test.runner.DiscoverRunner``) uses the test discovery
82  
-features built into unittest2 (the version of unittest in the Python 2.7+
83  
-standard library, and bundled with Django). With test discovery, tests can be
84  
-located in any module whose name matches the pattern ``test*.py``.
  82
+features built into ``unittest2`` (the version of ``unittest`` in the
  83
+Python 2.7+ standard library, and bundled with Django). With test discovery,
  84
+tests can be located in any module whose name matches the pattern ``test*.py``.
85 85
 
86 86
 In addition, the test labels provided to ``./manage.py test`` to nominate
87 87
 specific tests to run must now be full Python dotted paths (or directory
@@ -111,7 +111,7 @@ Django 1.6 adds support for savepoints in SQLite, with some :ref:`limitations
111 111
 ``BinaryField`` model field
112 112
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
113 113
 
114  
-A new :class:`django.db.models.BinaryField` model field allows to store raw
  114
+A new :class:`django.db.models.BinaryField` model field allows storage of raw
115 115
 binary data in the database.
116 116
 
117 117
 GeoDjango form widgets
@@ -127,13 +127,13 @@ Minor features
127 127
 * Authentication backends can raise ``PermissionDenied`` to immediately fail
128 128
   the authentication chain.
129 129
 
130  
-* The HttpOnly flag can be set on the CSRF cookie with
  130
+* The ``HttpOnly`` flag can be set on the CSRF cookie with
131 131
   :setting:`CSRF_COOKIE_HTTPONLY`.
132 132
 
133  
-* The ``assertQuerysetEqual()`` now checks for undefined order and raises
134  
-  ``ValueError`` if undefined order is spotted. The order is seen as
135  
-  undefined if the given ``QuerySet`` isn't ordered and there are more than
136  
-  one ordered values to compare against.
  133
+* The :meth:`~django.test.TransactionTestCase.assertQuerysetEqual` now checks
  134
+  for undefined order and raises :exc:`~exceptions.ValueError` if undefined
  135
+  order is spotted. The order is seen as undefined if the given ``QuerySet``
  136
+  isn't ordered and there are more than one ordered values to compare against.
137 137
 
138 138
 * Added :meth:`~django.db.models.query.QuerySet.earliest` for symmetry with
139 139
   :meth:`~django.db.models.query.QuerySet.latest`.
@@ -146,10 +146,10 @@ Minor features
146 146
 * The default widgets for :class:`~django.forms.EmailField`,
147 147
   :class:`~django.forms.URLField`, :class:`~django.forms.IntegerField`,
148 148
   :class:`~django.forms.FloatField` and :class:`~django.forms.DecimalField` use
149  
-  the new type attributes available in HTML5 (type='email', type='url',
150  
-  type='number'). Note that due to erratic support of the ``number`` input type
151  
-  with localized numbers in current browsers, Django only uses it when numeric
152  
-  fields are not localized.
  149
+  the new type attributes available in HTML5 (``type='email'``, ``type='url'``,
  150
+  ``type='number'``). Note that due to erratic support of the ``number``
  151
+  input type with localized numbers in current browsers, Django only uses it
  152
+  when numeric fields are not localized.
153 153
 
154 154
 * The ``number`` argument for :ref:`lazy plural translations
155 155
   <lazy-plural-translations>` can be provided at translation time rather than
@@ -185,19 +185,21 @@ Minor features
185 185
 * The jQuery library embedded in the admin has been upgraded to version 1.9.1.
186 186
 
187 187
 * Syndication feeds (:mod:`django.contrib.syndication`) can now pass extra
188  
-  context through to feed templates using a new `Feed.get_context_data()`
189  
-  callback.
  188
+  context through to feed templates using a new
  189
+  :meth:`Feed.get_context_data()
  190
+  <django.contrib.syndication.Feed.get_context_data>` callback.
190 191
 
191 192
 * The admin list columns have a ``column-<field_name>`` class in the HTML
192 193
   so the columns header can be styled with CSS, e.g. to set a column width.
193 194
 
194  
-* The isolation level can be customized under PostgreSQL.
  195
+* The :ref:`isolation level<database-isolation-level>` can be customized under
  196
+  PostgreSQL.
195 197
 
196 198
 * The :ttag:`blocktrans` template tag now respects
197 199
   :setting:`TEMPLATE_STRING_IF_INVALID` for variables not present in the
198 200
   context, just like other template constructs.
199 201
 
200  
-* SimpleLazyObjects will now present more helpful representations in shell
  202
+* ``SimpleLazyObject``\s will now present more helpful representations in shell
201 203
   debugging situations.
202 204
 
203 205
 * Generic :class:`~django.contrib.gis.db.models.GeometryField` is now editable
@@ -210,7 +212,7 @@ Minor features
210 212
 * The documentation contains a :doc:`deployment checklist
211 213
   </howto/deployment/checklist>`.
212 214
 
213  
-* The :djadmin:`diffsettings` comand gained a ``--all`` option.
  215
+* The :djadmin:`diffsettings` command gained a ``--all`` option.
214 216
 
215 217
 * ``django.forms.fields.Field.__init__`` now calls ``super()``, allowing
216 218
   field mixins to implement ``__init__()`` methods that will reliably be
@@ -241,17 +243,19 @@ Minor features
241 243
 * The ``choices`` argument to model fields now accepts an iterable of iterables
242 244
   instead of requiring an iterable of lists or tuples.
243 245
 
244  
-* The reason phrase can be customized in HTTP responses.
  246
+* The reason phrase can be customized in HTTP responses using
  247
+  :attr:`~django.http.HttpResponse.reason_phrase`.
245 248
 
246  
-* When giving the URL of the next page for :func:`~django.contrib.auth.views.logout`,
  249
+* When giving the URL of the next page for
  250
+  :func:`~django.contrib.auth.views.logout`,
247 251
   :func:`~django.contrib.auth.views.password_reset`,
248 252
   :func:`~django.contrib.auth.views.password_reset_confirm`,
249 253
   and :func:`~django.contrib.auth.views.password_change`, you can now pass
250 254
   URL names and they will be resolved.
251 255
 
252  
-* The ``dumpdata`` manage.py command now has a --pks option which will
253  
-  allow users to specify the primary keys of objects they want to dump.
254  
-  This option can only be used with one model.
  256
+* The :djadmin:`dumpdata` ``manage.py`` command now has a :djadminopt:`--pks`
  257
+  option which will allow users to specify the primary keys of objects they
  258
+  want to dump. This option can only be used with one model.
255 259
 
256 260
 * Added ``QuerySet`` methods :meth:`~django.db.models.query.QuerySet.first`
257 261
   and :meth:`~django.db.models.query.QuerySet.last` which are convenience
@@ -259,16 +263,18 @@ Minor features
259 263
   ``None`` if there are no objects matching.
260 264
 
261 265
 * :class:`~django.views.generic.base.View` and
262  
-  :class:`~django.views.generic.base.RedirectView` now support HTTP PATCH method.
  266
+  :class:`~django.views.generic.base.RedirectView` now support HTTP ``PATCH``
  267
+  method.
263 268
 
264 269
 * :class:`GenericForeignKey <django.contrib.contenttypes.generic.GenericForeignKey>`
265  
-  now takes an optional ``for_concrete_model`` argument, which when set to
266  
-  ``False`` allows the field to reference proxy models. The default is ``True``
267  
-  to retain the old behavior.
  270
+  now takes an optional
  271
+  :attr:`~django.contrib.contenttypes.generic.GenericForeignKey.for_concrete_model`
  272
+  argument, which when set to ``False`` allows the field to reference proxy
  273
+  models. The default is ``True`` to retain the old behavior.
268 274
 
269  
-* The middleware :class:`~django.middleware.locale.LocaleMiddleware` now
270  
-  stores active language in session if it is not present there. This
271  
-  prevents loss of language settings after session flush, e.g. logout.
  275
+* The :class:`~django.middleware.locale.LocaleMiddleware` now stores the active
  276
+  language in session if it is not present there. This prevents loss of
  277
+  language settings after session flush, e.g. logout.
272 278
 
273 279
 * :exc:`~django.core.exceptions.SuspiciousOperation` has been differentiated
274 280
   into a number of subclasses, and each will log to a matching named logger
@@ -316,7 +322,7 @@ Behavior changes
316 322
 
317 323
 Database-level autocommit is enabled by default in Django 1.6. While this
318 324
 doesn't change the general spirit of Django's transaction management, there
319  
-are a few known backwards-incompatibities, described in the :ref:`transaction
  325
+are a few known backwards-incompatibilities, described in the :ref:`transaction
320 326
 management docs <transactions-upgrading-from-1.5>`. You should review your
321 327
 code to determine if you're affected.
322 328
 
@@ -496,7 +502,7 @@ For Oracle, execute this query:
496 502
 
497 503
     ALTER TABLE DJANGO_COMMENTS MODIFY (ip_address VARCHAR2(39));
498 504
 
499  
-If you do not apply this change, the behaviour is unchanged: on MySQL, IPv6
  505
+If you do not apply this change, the behavior is unchanged: on MySQL, IPv6
500 506
 addresses are silently truncated; on Oracle, an exception is generated. No
501 507
 database change is needed for SQLite or PostgreSQL databases.
502 508
 
@@ -617,11 +623,12 @@ Miscellaneous
617 623
   stored as ``null``. Previously, storing a ``blank`` value in a field which
618 624
   did not allow ``null`` would cause a database exception at runtime.
619 625
 
620  
-* If a :class:`~django.core.urlresolvers.NoReverseMatch` exception is risen
621  
-  from a method when rendering a template it is not silenced. For example
622  
-  {{ obj.view_href }} will cause template rendering to fail if view_href()
623  
-  raises NoReverseMatch. There is no change to {% url %} tag, it causes
624  
-  template rendering to fail like always when NoReverseMatch is risen.
  626
+* If a :class:`~django.core.urlresolvers.NoReverseMatch` exception is raised
  627
+  from a method when rendering a template, it is not silenced. For example,
  628
+  ``{{ obj.view_href }}`` will cause template rendering to fail if
  629
+  ``view_href()`` raises ``NoReverseMatch``. There is no change to the
  630
+  ``{% url %}`` tag, it causes template rendering to fail like always when
  631
+  ``NoReverseMatch`` is risen.
625 632
 
626 633
 * :meth:`django.test.client.Client.logout` now calls
627 634
   :meth:`django.contrib.auth.logout` which will send the
@@ -738,7 +745,7 @@ from your settings.
738 745
 If you defined your own form widgets and defined the ``_has_changed`` method
739 746
 on a widget, you should now define this method on the form field itself.
740 747
 
741  
-``module_name`` model meta attribute
  748
+``module_name`` model _meta attribute
742 749
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
743 750
 
744 751
 ``Model._meta.module_name`` was renamed to ``model_name``. Despite being a
@@ -780,7 +787,7 @@ particular with boolean fields, it is possible for this problem to be completely
780 787
 invisible. This is a form of `Mass assignment vulnerability
781 788
 <http://en.wikipedia.org/wiki/Mass_assignment_vulnerability>`_.
782 789
 
783  
-For this reason, this behaviour is deprecated, and using the ``Meta.exclude``
  790
+For this reason, this behavior is deprecated, and using the ``Meta.exclude``
784 791
 option is strongly discouraged. Instead, all fields that are intended for
785 792
 inclusion in the form should be listed explicitly in the ``fields`` attribute.
786 793
 
@@ -799,7 +806,7 @@ is another option. The admin has its own methods for defining fields
799 806
 redundant. Instead, simply omit the ``Meta`` inner class of the ``ModelForm``,
800 807
 or omit the ``Meta.model`` attribute. Since the ``ModelAdmin`` subclass knows
801 808
 which model it is for, it can add the necessary attributes to derive a
802  
-functioning ``ModelForm``. This behaviour also works for earlier Django
  809
+functioning ``ModelForm``. This behavior also works for earlier Django
803 810
 versions.
804 811
 
805 812
 ``UpdateView`` and ``CreateView`` without explicit fields
@@ -821,10 +828,10 @@ deprecated.
821 828
 
822 829
 .. _m2m-help_text-deprecation:
823 830
 
824  
-Munging of help text of model form fields for ManyToManyField fields
825  
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  831
+Munging of help text of model form fields for ``ManyToManyField`` fields
  832
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
826 833
 
827  
-All special handling of the ``help_text`` attibute of ManyToManyField model
  834
+All special handling of the ``help_text`` attribute of ``ManyToManyField`` model
828 835
 fields performed by standard model or model form fields as described in
829 836
 :ref:`m2m-help_text` above is deprecated and will be removed in Django 1.8.
830 837
 
2  docs/topics/testing/overview.txt
@@ -953,7 +953,7 @@ to test the effects of commit and rollback:
953 953
     key values started at one in :class:`~django.test.TransactionTestCase`
954 954
     tests.
955 955
 
956  
-    Tests should not depend on this behaviour, but for legacy tests that do, the
  956
+    Tests should not depend on this behavior, but for legacy tests that do, the
957 957
     :attr:`~TransactionTestCase.reset_sequences` attribute can be used until
958 958
     the test has been properly updated.
959 959
 

0 notes on commit bb863fa

Please sign in to comment.
Something went wrong with that request. Please try again.