|
@@ -48,6 +48,7 @@ you'll need to make to handle them -- are documented in the list of
|
|
|
.. _using Python's logging facilities: `Logging`_
|
|
|
.. _easy handling of static files: `Extended static files handling`_
|
|
|
.. _the unittest2 library: `unittest2 support`_
|
|
|
+.. _begins the deprecation process for some features: `deprecated-features-1.3`_
|
|
|
|
|
|
What's new in Django 1.3
|
|
|
========================
|
|
@@ -103,7 +104,7 @@ for more details or learn how to :doc:`manage static files
|
|
|
</howto/static-files>`.
|
|
|
|
|
|
unittest2 support
|
|
|
-~~~~~~~~~~~~~~~~~~~~~
|
|
|
+~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
Python 2.7 introduced some major changes to the ``unittest`` library,
|
|
|
adding some extremely useful features. To ensure that every Django
|
|
@@ -279,7 +280,7 @@ process has been on adding lots of smaller, long standing feature
|
|
|
requests. These include:
|
|
|
|
|
|
* Improved tools for accessing and manipulating the current ``Site``
|
|
|
- object in :ref:`the sites framework <ref/contrib/sites>`.
|
|
|
+ object in :doc:`the sites framework </ref/contrib/sites>`.
|
|
|
|
|
|
* A :class:`~django.test.client.RequestFactory` for mocking requests
|
|
|
in tests.
|
|
@@ -324,10 +325,12 @@ CSRF validation now applies to AJAX requests
|
|
|
Prior to Django 1.2.5, Django's CSRF-prevention system exempted AJAX
|
|
|
requests from CSRF verification; due to `security issues`_ reported to
|
|
|
us, however, *all* requests are now subjected to CSRF
|
|
|
-verification. Consult :ref:`the Django CSRF documentation
|
|
|
-<ref/contrib/csrf>` for details on how to handle CSRF verification in
|
|
|
+verification. Consult :doc:`the Django CSRF documentation
|
|
|
+</ref/contrib/csrf>` for details on how to handle CSRF verification in
|
|
|
AJAX requests.
|
|
|
|
|
|
+.. _security issues: http://www.djangoproject.com/weblog/2011/feb/08/security/
|
|
|
+
|
|
|
Restricted filters in admin interface
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
@@ -450,15 +453,15 @@ Localflavor changes
|
|
|
Django 1.3 introduces the following backwards-incompatible changes to
|
|
|
local flavors:
|
|
|
|
|
|
-* Indonesia (id) -- The province "Nanggroe Aceh Darussalam (NAD)" has
|
|
|
- been removed from the province list in favor of the new official
|
|
|
- designation "Aceh (ACE)".
|
|
|
-
|
|
|
* Canada (ca) -- The province "Newfoundland and Labrador" has had its
|
|
|
province code updated to "NL", rather than the older "NF". In
|
|
|
addition, the Yukon Territory has had its province code corrected to
|
|
|
"YT", instead of "YK".
|
|
|
|
|
|
+* Indonesia (id) -- The province "Nanggroe Aceh Darussalam (NAD)" has
|
|
|
+ been removed from the province list in favor of the new official
|
|
|
+ designation "Aceh (ACE)".
|
|
|
+
|
|
|
* United States of America (us) -- The list of "states" used by
|
|
|
``USStateField`` has expanded to include Armed Forces postal
|
|
|
codes. This is backwards-incompatible if you were relying on
|
|
@@ -615,8 +618,8 @@ transactions that are being managed using
|
|
|
|
|
|
@transaction.commit_manually
|
|
|
def my_view(request, name):
|
|
|
- obj = get_object_or_404(MyObject, name__iexact=name)
|
|
|
- return render_to_response('template', {'object':obj})
|
|
|
+ obj = get_object_or_404(MyObject, name__iexact=name)
|
|
|
+ return render_to_response('template', {'object':obj})
|
|
|
|
|
|
Prior to Django 1.3, this would work without error. However, under
|
|
|
Django 1.3, this will raise a :class:`TransactionManagementError` because
|