2010-02-06 11:37:50 +08:00
|
|
|
===============================
|
|
|
|
Django 1.2 beta 1 release notes
|
|
|
|
===============================
|
|
|
|
|
|
|
|
February 5, 2010
|
|
|
|
|
|
|
|
Welcome to Django 1.2 beta 1!
|
|
|
|
|
|
|
|
This is the second in a series of preview/development releases leading
|
|
|
|
up to the eventual release of Django 1.2, currently scheduled to take
|
|
|
|
place in March 2010. This release is primarily targeted at developers
|
|
|
|
who are interested in trying out new features and testing the Django
|
|
|
|
codebase to help identify and resolve bugs prior to the final 1.2
|
|
|
|
release.
|
|
|
|
|
|
|
|
As such, this release is *not* intended for production use, and any
|
|
|
|
such use is discouraged.
|
|
|
|
|
|
|
|
This document covers changes since the Django 1.2 alpha release; the
|
2010-08-20 03:27:44 +08:00
|
|
|
:doc:`1.2 alpha release notes </releases/1.2-alpha-1>` cover new and
|
2010-02-06 11:37:50 +08:00
|
|
|
updated features in Django between 1.1 and 1.2 alpha.
|
|
|
|
|
|
|
|
|
2010-02-06 13:19:15 +08:00
|
|
|
Deprecations and other changes in 1.2 beta
|
|
|
|
==========================================
|
2010-02-06 11:37:50 +08:00
|
|
|
|
2010-02-07 04:48:55 +08:00
|
|
|
This beta release deprecates two portions of public API, and
|
|
|
|
introduces a potentially backwards-incompatible change to
|
2010-08-20 03:27:44 +08:00
|
|
|
another. Under :doc:`our API stability policy </misc/api-stability>`,
|
2010-02-07 04:48:55 +08:00
|
|
|
deprecation proceeds over multiple release cycles: initially, the
|
|
|
|
deprecated API will raise ``PendingDeprecationWarning``, followed by
|
|
|
|
raising ``DeprecationWarning`` in the next release, and finally
|
|
|
|
removal of the deprecated API in the release after that. APIs
|
|
|
|
beginning the deprecation process in Django 1.2 will be removed in the
|
|
|
|
Django 1.4 release.
|
2010-02-06 11:37:50 +08:00
|
|
|
|
|
|
|
|
2010-02-06 13:19:15 +08:00
|
|
|
Unit test runners
|
|
|
|
-----------------
|
2010-02-06 11:37:50 +08:00
|
|
|
|
|
|
|
Django 1.2 changes the test runner tools to use a class-based
|
|
|
|
approach. Old style function-based test runners will still work, but
|
|
|
|
should be updated to use the new :ref:`class-based runners
|
|
|
|
<topics-testing-test_runner>`.
|
|
|
|
|
|
|
|
|
2010-02-06 13:19:15 +08:00
|
|
|
Syndication feeds
|
|
|
|
-----------------
|
2010-02-06 11:37:50 +08:00
|
|
|
|
|
|
|
The :class:`django.contrib.syndication.feeds.Feed` class is being
|
|
|
|
replaced by the :class:`django.contrib.syndication.views.Feed` class.
|
2010-02-06 13:19:15 +08:00
|
|
|
The old ``feeds.Feed`` class is deprecated. The new class has an
|
|
|
|
almost identical API, but allows instances to be used as views.
|
|
|
|
|
|
|
|
Also, in accordance with `RSS best practices`_, RSS feeds will now
|
|
|
|
include an ``atom:link`` element. You may need to update your tests to
|
|
|
|
take this into account.
|
2010-02-06 11:37:50 +08:00
|
|
|
|
2010-08-20 03:27:44 +08:00
|
|
|
For more information, see the full :doc:`syndication framework
|
|
|
|
documentation </ref/contrib/syndication>`.
|
2010-02-06 11:37:50 +08:00
|
|
|
|
|
|
|
.. _RSS best practices: http://www.rssboard.org/rss-profile
|
|
|
|
|
|
|
|
|
|
|
|
Cookie encoding
|
|
|
|
---------------
|
|
|
|
|
|
|
|
Due to cookie-handling bugs in Internet Explorer, Safari, and possibly
|
2010-02-06 13:19:15 +08:00
|
|
|
other browsers, Django's encoding of cookie values was changed so that
|
|
|
|
the characters comma (',') and semi-colon (';') are treated as
|
|
|
|
non-safe characters, and are therefore encoded as ``\054`` and
|
|
|
|
``\073`` respectively. This could produce backwards incompatibilities
|
|
|
|
if you are relying on the ability to set these characters directly in
|
|
|
|
cookie values.
|
|
|
|
|
|
|
|
|
|
|
|
What's new in 1.2 beta
|
|
|
|
======================
|
|
|
|
|
|
|
|
This 1.2 beta release marks the final feature freeze for Django 1.2;
|
|
|
|
while most feature development was completed for 1.2 alpha (which
|
|
|
|
constituted a freeze on major features), a few other new features were
|
|
|
|
added afterward and so are new as of 1.2 beta.
|
2010-02-06 11:37:50 +08:00
|
|
|
|
|
|
|
|
|
|
|
Object-level permissions
|
|
|
|
------------------------
|
|
|
|
|
2010-02-06 11:57:02 +08:00
|
|
|
A foundation for specifying permissions at the per-object level was
|
|
|
|
added in Django 1.2 alpha but not documented with the alpha release.
|
|
|
|
|
|
|
|
The default authentication backends shipped with Django do not
|
|
|
|
currently make use of this, but third-party authentication backends
|
2010-08-20 03:27:44 +08:00
|
|
|
are free to do so. See the :doc:`authentication docs </topics/auth>`
|
2010-02-06 11:57:02 +08:00
|
|
|
for more information.
|
|
|
|
|
2010-02-06 11:37:50 +08:00
|
|
|
|
|
|
|
Permissions for anonymous users
|
|
|
|
-------------------------------
|
|
|
|
|
|
|
|
If you provide a custom authentication backend with the attribute
|
|
|
|
``supports_anonymous_user`` set to ``True``, the ``AnonymousUser``
|
|
|
|
class will check the backend for permissions, just as the normal
|
|
|
|
``User`` does. This is intended to help centralize permission
|
|
|
|
handling; apps can always delegate the question of whether something
|
|
|
|
is allowed or not to the authorization/authentication system. See the
|
2010-08-20 03:27:44 +08:00
|
|
|
:doc:`authentication docs </topics/auth>` for more details.
|
2010-02-06 11:37:50 +08:00
|
|
|
|
|
|
|
|
2010-02-06 13:19:15 +08:00
|
|
|
``select_related()`` improvements
|
|
|
|
---------------------------------
|
|
|
|
|
|
|
|
The ``select_related()`` method of ``QuerySet`` now accepts the
|
|
|
|
``related_name`` of a reverse one-to-one relation in the list of
|
|
|
|
fields to select. One-to-one relations will not, however, be traversed
|
|
|
|
by a depth-based ``select_related()`` call.
|
|
|
|
|
|
|
|
|
2010-02-06 11:37:50 +08:00
|
|
|
The Django 1.2 roadmap
|
|
|
|
======================
|
|
|
|
|
|
|
|
Before the final Django 1.2 release, at least one additional
|
|
|
|
preview/development releases will be made available. The current
|
|
|
|
schedule consists of at least the following:
|
|
|
|
|
|
|
|
* Week of **March 2, 2010**: First Django 1.2 release
|
|
|
|
candidate. String freeze for translations.
|
|
|
|
|
|
|
|
* Week of **March 9, 2010**: Django 1.2 final release.
|
|
|
|
|
|
|
|
If necessary, additional beta or release-candidate packages will be
|
|
|
|
issued prior to the final 1.2 release. Django 1.2 will be released
|
|
|
|
approximately one week after the final release candidate.
|
|
|
|
|
|
|
|
|
|
|
|
What you can do to help
|
|
|
|
=======================
|
|
|
|
|
|
|
|
In order to provide a high-quality 1.2 release, we need your
|
|
|
|
help. Although this beta release is, again, *not* intended for
|
|
|
|
production use, you can help the Django team by trying out the beta
|
|
|
|
codebase in a safe test environment and reporting any bugs or issues
|
|
|
|
you encounter. The Django ticket tracker is the central place to
|
|
|
|
search for open issues:
|
|
|
|
|
|
|
|
* http://code.djangoproject.com/timeline
|
|
|
|
|
|
|
|
Please open new tickets if no existing ticket corresponds to a problem
|
|
|
|
you're running into.
|
|
|
|
|
|
|
|
Additionally, discussion of Django development, including progress
|
|
|
|
toward the 1.2 release, takes place daily on the django-developers
|
|
|
|
mailing list:
|
|
|
|
|
|
|
|
* http://groups.google.com/group/django-developers
|
|
|
|
|
2010-02-06 13:32:46 +08:00
|
|
|
... and in the ``#django-dev`` IRC channel on ``irc.freenode.net``. If you're
|
2010-02-06 11:37:50 +08:00
|
|
|
interested in helping out with Django's development, feel free to join the
|
|
|
|
discussions there.
|
|
|
|
|
|
|
|
Django's online documentation also includes pointers on how to
|
|
|
|
contribute to Django:
|
|
|
|
|
2010-08-20 03:27:44 +08:00
|
|
|
* :doc:`How to contribute to Django </internals/contributing>`
|
2010-02-06 11:37:50 +08:00
|
|
|
|
|
|
|
Contributions on any level -- developing code, writing documentation
|
|
|
|
or simply triaging tickets and helping to test proposed bugfixes --
|
|
|
|
are always welcome and appreciated.
|
|
|
|
|
|
|
|
Development sprints for Django 1.2 will also be taking place at PyCon
|
|
|
|
US 2010, on the dedicated sprint days (February 22 through 25), and
|
|
|
|
anyone who wants to help out is welcome to join in, either in person
|
|
|
|
at PyCon or virtually in the IRC channel or on the mailing list.
|