2009-07-21 03:51:40 +02:00
|
|
|
.. _internals-deprecation:
|
|
|
|
|
|
|
|
===========================
|
|
|
|
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 02:47:23 +01: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 02:05:35 +01:00
|
|
|
|
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 00:23:07 +01: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 01:36:34 +01:00
|
|
|
* The old imports for CSRF functionality (``django.contrib.csrf.*``),
|
|
|
|
which moved to core in 1.2, will be removed.
|
|
|
|
|
2009-11-03 13:53:26 +01:00
|
|
|
* ``SMTPConnection``. The 1.2 release deprecated the ``SMTPConnection``
|
|
|
|
class in favor of a generic E-mail backend API.
|
|
|
|
|
2009-11-03 15:02:49 +01:00
|
|
|
* The many to many SQL generation functions on the database backends
|
2009-12-22 16:18:51 +01: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 15:02:49 +01:00
|
|
|
|
2009-12-09 17:57:23 +01: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 13:08:23 +01:00
|
|
|
been deprecated since the 1.2 release, will be removed. The
|
|
|
|
:ref:`messages framework <ref-contrib-messages>` should be used
|
2009-12-09 17:57:23 +01:00
|
|
|
instead.
|
|
|
|
|
2009-12-10 02:05:35 +01: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 02:47:23 +01: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 13:08:23 +01: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-22 18:58:49 +01: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 16:11:01 +01: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 14:46:18 +01: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.
|
|
|
|
|
2009-07-21 03:51:40 +02: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.
|