2009-07-21 09:51:40 +08:00
|
|
|
===========================
|
|
|
|
Django Deprecation Timeline
|
|
|
|
===========================
|
|
|
|
|
|
|
|
This document outlines when various pieces of Django will be removed, following
|
|
|
|
their deprecation, as per the :ref:`Django deprecation policy
|
|
|
|
<internal-release-deprecation-policy>`
|
|
|
|
|
|
|
|
* 1.3
|
|
|
|
* ``AdminSite.root()``. This release will remove the old method for
|
|
|
|
hooking up admin URLs. This has been deprecated since the 1.1
|
|
|
|
release.
|
|
|
|
|
2010-01-28 09:47:23 +08:00
|
|
|
* Authentication backends need to define the boolean attributes
|
|
|
|
``supports_object_permissions`` and ``supports_anonymous_user``.
|
|
|
|
The old backend style is deprecated since the 1.2 release.
|
2009-12-10 09:05:35 +08:00
|
|
|
|
2010-05-06 00:06:39 +08:00
|
|
|
* The :mod:`django.contrib.gis.db.backend` module, including the
|
|
|
|
``SpatialBackend`` interface, is deprecated since the 1.2 release.
|
|
|
|
|
Fixed #9977 - CsrfMiddleware gets template tag added, session dependency removed, and turned on by default.
This is a large change to CSRF protection for Django. It includes:
* removing the dependency on the session framework.
* deprecating CsrfResponseMiddleware, and replacing with a core template tag.
* turning on CSRF protection by default by adding CsrfViewMiddleware to
the default value of MIDDLEWARE_CLASSES.
* protecting all contrib apps (whatever is in settings.py)
using a decorator.
For existing users of the CSRF functionality, it should be a seamless update,
but please note that it includes DEPRECATION of features in Django 1.1,
and there are upgrade steps which are detailed in the docs.
Many thanks to 'Glenn' and 'bthomas', who did a lot of the thinking and work
on the patch, and to lots of other people including Simon Willison and
Russell Keith-Magee who refined the ideas.
Details of the rationale for these changes is found here:
http://code.djangoproject.com/wiki/CsrfProtection
As of this commit, the CSRF code is mainly in 'contrib'. The code will be
moved to core in a separate commit, to make the changeset as readable as
possible.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11660 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-27 07:23:07 +08:00
|
|
|
* 1.4
|
|
|
|
* ``CsrfResponseMiddleware``. This has been deprecated since the 1.2
|
|
|
|
release, in favour of the template tag method for inserting the CSRF
|
|
|
|
token. ``CsrfMiddleware``, which combines ``CsrfResponseMiddleware``
|
|
|
|
and ``CsrfViewMiddleware``, is also deprecated.
|
|
|
|
|
2009-10-27 08:36:34 +08:00
|
|
|
* The old imports for CSRF functionality (``django.contrib.csrf.*``),
|
|
|
|
which moved to core in 1.2, will be removed.
|
|
|
|
|
2009-11-03 20:53:26 +08:00
|
|
|
* ``SMTPConnection``. The 1.2 release deprecated the ``SMTPConnection``
|
|
|
|
class in favor of a generic E-mail backend API.
|
|
|
|
|
2009-11-03 22:02:49 +08:00
|
|
|
* The many to many SQL generation functions on the database backends
|
2009-12-22 23:18:51 +08:00
|
|
|
will be removed.
|
|
|
|
|
|
|
|
* The ability to use the ``DATABASE_*`` family of top-level settings to
|
|
|
|
define database connections will be removed.
|
|
|
|
|
|
|
|
* The ability to use shorthand notation to specify a database backend
|
|
|
|
(i.e., ``sqlite3`` instead of ``django.db.backends.sqlite3``) will be
|
|
|
|
removed.
|
|
|
|
|
|
|
|
* The ``get_db_prep_save``, ``get_db_prep_value`` and
|
|
|
|
``get_db_prep_lookup`` methods on Field were modified in 1.2 to support
|
|
|
|
multiple databases. In 1.4, the support functions that allow methods
|
|
|
|
with the old prototype to continue working will be removed.
|
2009-11-03 22:02:49 +08:00
|
|
|
|
2009-12-10 00:57:23 +08:00
|
|
|
* The ``Message`` model (in ``django.contrib.auth``), its related
|
|
|
|
manager in the ``User`` model (``user.message_set``), and the
|
|
|
|
associated methods (``user.message_set.create()`` and
|
|
|
|
``user.get_and_delete_messages()``), which have
|
2009-12-14 20:08:23 +08:00
|
|
|
been deprecated since the 1.2 release, will be removed. The
|
2010-08-20 03:27:44 +08:00
|
|
|
:doc:`messages framework </ref/contrib/messages>` should be used
|
2009-12-10 00:57:23 +08:00
|
|
|
instead.
|
|
|
|
|
2009-12-10 09:05:35 +08:00
|
|
|
* Authentication backends need to support the ``obj`` parameter for
|
|
|
|
permission checking. The ``supports_object_permissions`` variable
|
|
|
|
is not checked any longer and can be removed.
|
|
|
|
|
2010-01-28 09:47:23 +08:00
|
|
|
* Authentication backends need to support the ``AnonymousUser``
|
|
|
|
being passed to all methods dealing with permissions.
|
|
|
|
The ``supports_anonymous_user`` variable is not checked any
|
|
|
|
longer and can be removed.
|
|
|
|
|
2009-12-14 20:08:23 +08:00
|
|
|
* The ability to specify a callable template loader rather than a
|
|
|
|
``Loader`` class will be removed, as will the ``load_template_source``
|
|
|
|
functions that are included with the built in template loaders for
|
|
|
|
backwards compatibility. These have been deprecated since the 1.2
|
|
|
|
release.
|
|
|
|
|
2009-12-23 01:58:49 +08:00
|
|
|
* ``django.utils.translation.get_date_formats()`` and
|
|
|
|
``django.utils.translation.get_partial_date_formats()``. These
|
|
|
|
functions are replaced by the new locale aware formatting; use
|
|
|
|
``django.utils.formats.get_format()`` to get the appropriate
|
|
|
|
formats.
|
|
|
|
|
|
|
|
* In ``django.forms.fields``: ``DEFAULT_DATE_INPUT_FORMATS``,
|
|
|
|
``DEFAULT_TIME_INPUT_FORMATS`` and
|
|
|
|
``DEFAULT_DATETIME_INPUT_FORMATS``. Use
|
|
|
|
``django.utils.formats.get_format()`` to get the appropriate
|
|
|
|
formats.
|
|
|
|
|
2010-01-18 23:11:01 +08:00
|
|
|
* The ability to use a function-based test runners will be removed,
|
|
|
|
along with the ``django.test.simple.run_tests()`` test runner.
|
|
|
|
|
2010-01-28 21:46:18 +08:00
|
|
|
* The ``views.feed()`` view and ``feeds.Feed`` class in
|
|
|
|
``django.contrib.syndication`` have been deprecated since the 1.2
|
|
|
|
release. The class-based view ``views.Feed`` should be used instead.
|
|
|
|
|
2010-02-22 07:40:47 +08:00
|
|
|
* ``django.core.context_processors.auth``. This release will
|
|
|
|
remove the old method in favor of the new method in
|
|
|
|
``django.contrib.auth.context_processors.auth``. This has been
|
|
|
|
deprecated since the 1.2 release.
|
|
|
|
|
2010-02-23 20:24:41 +08:00
|
|
|
* The ``postgresql`` database backend has been deprecated in favor of
|
|
|
|
the ``postgresql_psycopg2`` backend.
|
|
|
|
|
2010-04-29 22:36:09 +08:00
|
|
|
* The ``no`` language code has been deprecated in favor of the ``nb``
|
|
|
|
language code.
|
|
|
|
|
2010-08-28 10:40:57 +08:00
|
|
|
* 1.5
|
|
|
|
* The ``mod_python`` request handler has been deprecated since the 1.3
|
|
|
|
release. The ``mod_wsgi`` handler should be used instead.
|
|
|
|
|
2010-10-10 10:16:33 +08:00
|
|
|
* The ``template`` attribute on :class:`~django.test.client.Response`
|
|
|
|
objects returned by the :ref:`test client <test-client>` has been
|
|
|
|
deprecated since the 1.3 release. The
|
|
|
|
:attr:`~django.test.client.Response.templates` attribute should be
|
|
|
|
used instead.
|
|
|
|
|
2010-10-11 21:18:00 +08:00
|
|
|
* The features of the :class:`django.test.simple.DjangoTestRunner`
|
|
|
|
(including fail-fast and Ctrl-C test termination) can now be provided
|
|
|
|
by the unittest-native :class:`TextTestRunner`. The
|
|
|
|
:class:`~django.test.simple.DjangoTestRunner` will be removed in
|
|
|
|
favor of using the unittest-native class.
|
|
|
|
|
2009-07-21 09:51:40 +08:00
|
|
|
* 2.0
|
|
|
|
* ``django.views.defaults.shortcut()``. This function has been moved
|
|
|
|
to ``django.contrib.contenttypes.views.shortcut()`` as part of the
|
|
|
|
goal of removing all ``django.contrib`` references from the core
|
|
|
|
Django codebase. The old shortcut will be removed in the 2.0
|
|
|
|
release.
|