~ubuntu-branches/ubuntu/quantal/python-django/quantal-security

« back to all changes in this revision

Viewing changes to docs/releases/1.1.txt

  • Committer: Bazaar Package Importer
  • Author(s): Raphaël Hertzog
  • Date: 2010-09-18 19:37:03 UTC
  • mto: (1.1.12 upstream) (4.4.9 sid)
  • mto: This revision was merged to the branch mainline in revision 30.
  • Revision ID: james.westby@ubuntu.com-20100918193703-sw44inm7dnu8mf42
Import upstream version 1.2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.. _releases-1.1:
2
 
 
3
1
========================
4
2
Django 1.1 release notes
5
3
========================
19
17
Backwards-incompatible changes in 1.1
20
18
=====================================
21
19
 
22
 
Django has a policy of :ref:`API stability <misc-api-stability>`. This means
 
20
Django has a policy of :doc:`API stability </misc/api-stability>`. This means
23
21
that, in general, code you develop against Django 1.0 should continue to work
24
22
against 1.1 unchanged. However, we do sometimes make backwards-incompatible
25
23
changes if they're necessary to resolve bugs, and there are a handful of such
176
174
1.3 will remove ``AdminSite.root()`` entirely.
177
175
 
178
176
For more details on our deprecation policies and strategy, see
179
 
:ref:`internals-release-process`.
 
177
:doc:`/internals/release-process`.
180
178
 
181
179
What's new in Django 1.1
182
180
========================
203
201
:class:`QuerySet` with the results of the aggregate query.
204
202
 
205
203
This feature is available as new :meth:`QuerySet.aggregate()`` and
206
 
:meth:`QuerySet.annotate()`` methods, and is covered in detail in :ref:`the ORM
207
 
aggregation documentation <topics-db-aggregation>`.
 
204
:meth:`QuerySet.annotate()`` methods, and is covered in detail in :doc:`the ORM
 
205
aggregation documentation </topics/db/aggregation>`.
208
206
 
209
207
Query expressions
210
208
~~~~~~~~~~~~~~~~~
258
256
particular fields, you can now tell Django not to retrieve them from the
259
257
database.
260
258
 
261
 
You'll do this with the :ref:`new queryset methods <queryset-defer>`
262
 
``defer()`` and ``only()``.
 
259
You'll do this with the new queryset methods
 
260
:meth:`~django.db.models.QuerySet.defer` and
 
261
:meth:`~django.db.models.QuerySet.only`.
263
262
 
264
263
Testing improvements
265
264
--------------------
266
265
 
267
 
A few notable improvements have been made to the :ref:`testing framework
268
 
<topics-testing>`.
 
266
A few notable improvements have been made to the :doc:`testing framework
 
267
</topics/testing>`.
269
268
 
270
269
Test performance improvements
271
270
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
272
271
 
273
272
.. currentmodule:: django.test
274
273
 
275
 
Tests written using Django's :ref:`testing framework <topics-testing>` now run
 
274
Tests written using Django's :doc:`testing framework </topics/testing>` now run
276
275
dramatically faster (as much as 10 times faster in many cases).
277
276
 
278
277
This was accomplished through the introduction of transaction-based tests: when
315
314
Admin "actions"
316
315
~~~~~~~~~~~~~~~
317
316
 
318
 
You can now define :ref:`admin actions <ref-contrib-admin-actions>` that can
 
317
You can now define :doc:`admin actions </ref/contrib/admin/actions>` that can
319
318
perform some action to a group of models in bulk. Users will be able to select
320
319
objects on the change list page and then apply these bulk actions to all
321
320
selected objects.
326
325
Conditional view processing
327
326
---------------------------
328
327
 
329
 
Django now has much better support for :ref:`conditional view processing
330
 
<topics-conditional-processing>` using the standard ``ETag`` and
 
328
Django now has much better support for :doc:`conditional view processing
 
329
</topics/conditional-view-processing>` using the standard ``ETag`` and
331
330
``Last-Modified`` HTTP headers. This means you can now easily short-circuit
332
331
view processing by testing less-expensive conditions. For many views this can
333
332
lead to a serious improvement in speed and reduction in bandwidth.
375
374
 
376
375
Other new features and changes introduced since Django 1.0 include:
377
376
 
378
 
* The :ref:`CSRF protection middleware <ref-contrib-csrf>` has been split into
 
377
* The :doc:`CSRF protection middleware </ref/contrib/csrf>` has been split into
379
378
  two classes -- ``CsrfViewMiddleware`` checks incoming requests, and
380
379
  ``CsrfResponseMiddleware`` processes outgoing responses. The combined
381
380
  ``CsrfMiddleware`` class (which does both) remains for
392
391
* The ``include()`` function in Django URLconf modules can now accept sequences
393
392
  of URL patterns (generated by ``patterns()``) in addition to module names.
394
393
 
395
 
* Instances of Django forms (see :ref:`the forms overview <topics-forms-index>`)
 
394
* Instances of Django forms (see :doc:`the forms overview </topics/forms/index>`)
396
395
  now have two additional methods, ``hidden_fields()`` and ``visible_fields()``,
397
396
  which return the list of hidden -- i.e., ``<input type="hidden">`` -- and
398
397
  visible fields on the form, respectively.
399
398
 
400
 
* The ``redirect_to`` generic view (see :ref:`the generic views documentation
401
 
  <ref-generic-views>`) now accepts an additional keyword argument
 
399
* The ``redirect_to`` generic view (see :doc:`the generic views documentation
 
400
  </ref/generic-views>`) now accepts an additional keyword argument
402
401
  ``permanent``. If ``permanent`` is ``True``, the view will emit an HTTP
403
402
  permanent redirect (status code 301). If ``False``, the view will emit an HTTP
404
403
  temporary redirect (status code 302).
411
410
 
412
411
* The ``{% for %}`` tag in Django's template language now accepts an optional
413
412
  ``{% empty %}`` clause, to be displayed when ``{% for %}`` is asked to loop
414
 
  over an empty sequence. See :ref:`the list of built-in template tags
415
 
  <ref-templates-builtins>` for examples of this.
 
413
  over an empty sequence. See :doc:`the list of built-in template tags
 
414
  </ref/templates/builtins>` for examples of this.
416
415
 
417
416
* The :djadmin:`dumpdata` management command now accepts individual
418
417
  model names as arguments, allowing you to export the data just from
421
420
* There's a new :tfilter:`safeseq` template filter which works just like
422
421
  :tfilter:`safe` for lists, marking each item in the list as safe.
423
422
 
424
 
* :ref:`Cache backends <topics-cache>` now support ``incr()`` and
 
423
* :doc:`Cache backends </topics/cache>` now support ``incr()`` and
425
424
  ``decr()`` commands to increment and decrement the value of a cache key.
426
425
  On cache backends that support atomic increment/decrement -- most
427
426
  notably, the memcached backend -- these operations will be atomic, and
428
427
  quite fast.
429
428
 
430
 
* Django now can :ref:`easily delegate authentication to the web server
431
 
  <howto-auth-remote-user>` via a new authentication backend that supports
 
429
* Django now can :doc:`easily delegate authentication to the web server
 
430
  </howto/auth-remote-user>` via a new authentication backend that supports
432
431
  the standard ``REMOTE_USER`` environment variable used for this purpose.
433
432
 
434
433
* There's a new :func:`django.shortcuts.redirect` function that makes it
455
454
Django's online documentation also includes pointers on how to contribute to
456
455
Django:
457
456
 
458
 
    * :ref:`How to contribute to Django <internals-contributing>`
 
457
    * :doc:`How to contribute to Django </internals/contributing>`
459
458
 
460
459
Contributions on any level -- developing code, writing documentation or simply
461
460
triaging tickets and helping to test proposed bugfixes -- are always welcome and