<
8000
svg aria-hidden="true" focusable="false" class="octicon octicon-kebab-horizontal" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom">
@@ -1,6 +1,8 @@
1
- ============================================
2
- Django 1.7 release notes - UNDER DEVELOPMENT
3
- ============================================
1
+ ========================
2
+ Django 1.7 release notes
3
+ ========================
4
+
5
+ *September 2, 2014*
4
6
5
7
Welcome to Django 1.7!
6
8
@@ -51,11 +53,11 @@ but a few of the key features are:
51
53
to your models and make migrations for them.
52
54
53
55
:data:`~django.db.models.signals.pre_syncdb` and
54
- :data:`~django.db.models.signals.post_syncdb` have been replaced by
55
- :data:`~django.db.models.signals.pre_migrate` and
56
- :data:`~django.db.models.signals.post_migrate` respectively. These new
57
- signals have slightly different arguments. Check the documentation for
58
- details.
56
+ :data:`~django.db.models.signals.post_syncdb` have been deprecated,
57
+ to be replaced by :data:`~django.db.models.signals.pre_migrate` and
58
+ :data:`~django.db.models.signals.post_migrate` respectively. These
59
+ new signals have slightly different arguments. Check the
60
+ documentation for details.
59
61
60
62
* The ``allow_syncdb`` method on database routers is now called ``allow_migrate``,
61
63
but still performs the same function. Routers with ``allow_syncdb`` methods
@@ -123,8 +125,10 @@ Improvements thus far include:
123
125
New method on Field subclasses
124
126
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
125
127
126
- To help power both schema migrations and composite keys, the :class:`~django.db.models.Field` API now
127
- has a new required method: ``deconstruct()``.
128
+ To help power both schema migrations and to enable easier addition of
129
+ composite keys in future releases of Django, the
130
+ :class:`~django.db.models.Field` API now has a new required method:
131
+ ``deconstruct()``.
128
132
129
133
This method takes no arguments, and returns a tuple of four items:
130
134
@@ -255,10 +259,13 @@ specific backend's cursor defined the behavior of the context manager. The
255
259
behavior of magic method lookups was changed with Python 2.7 and cursors were
256
260
no longer usable as context managers.
257
261
258
- Django 1.7 allows a cursor to be used as a context manager that is a shortcut
259
- for the following, instead of backend specific behavior.
262
+ Django 1.7 allows a cursor to be used as a context manager. That is,
263
+ the following can be used::
264
+
265
+ with connection.cursor() as c:
266
+ c.execute(...)
260
267
261
- .. code-block:: python
268
+ instead of::
262
269
263
270
c = connection.cursor()
264
271
try:
@@ -285,7 +292,7 @@ to ``DateField`` it is possible to filter on the transformed value, for
285
292
example ``qs.filter(author__birthdate__year__lte=1981)``.
286
293
287
294
For more information about both custom lookups and transforms refer to
288
- :doc:`custom lookups </howto/custom-lookups>` documentation.
295
+ the :doc:`custom lookups </howto/custom-lookups>` documentation.
289
296
290
297
Improvements to ``Form`` error handling
291
298
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0 commit comments