|
1 =========================== |
|
2 Django Deprecation Timeline |
|
3 =========================== |
|
4 |
|
5 This document outlines when various pieces of Django will be removed, following |
|
6 their deprecation, as per the :ref:`Django deprecation policy |
|
7 <internal-release-deprecation-policy>` |
|
8 |
|
9 * 1.3 |
|
10 * ``AdminSite.root()``. This release will remove the old method for |
|
11 hooking up admin URLs. This has been deprecated since the 1.1 |
|
12 release. |
|
13 |
|
14 * Authentication backends need to define the boolean attributes |
|
15 ``supports_object_permissions`` and ``supports_anonymous_user``. |
|
16 The old backend style is deprecated since the 1.2 release. |
|
17 |
|
18 * The :mod:`django.contrib.gis.db.backend` module, including the |
|
19 ``SpatialBackend`` interface, is deprecated since the 1.2 release. |
|
20 |
|
21 * 1.4 |
|
22 * ``CsrfResponseMiddleware``. This has been deprecated since the 1.2 |
|
23 release, in favour of the template tag method for inserting the CSRF |
|
24 token. ``CsrfMiddleware``, which combines ``CsrfResponseMiddleware`` |
|
25 and ``CsrfViewMiddleware``, is also deprecated. |
|
26 |
|
27 * The old imports for CSRF functionality (``django.contrib.csrf.*``), |
|
28 which moved to core in 1.2, will be removed. |
|
29 |
|
30 * ``SMTPConnection``. The 1.2 release deprecated the ``SMTPConnection`` |
|
31 class in favor of a generic E-mail backend API. |
|
32 |
|
33 * The many to many SQL generation functions on the database backends |
|
34 will be removed. |
|
35 |
|
36 * The ability to use the ``DATABASE_*`` family of top-level settings to |
|
37 define database connections will be removed. |
|
38 |
|
39 * The ability to use shorthand notation to specify a database backend |
|
40 (i.e., ``sqlite3`` instead of ``django.db.backends.sqlite3``) will be |
|
41 removed. |
|
42 |
|
43 * The ``get_db_prep_save``, ``get_db_prep_value`` and |
|
44 ``get_db_prep_lookup`` methods on Field were modified in 1.2 to support |
|
45 multiple databases. In 1.4, the support functions that allow methods |
|
46 with the old prototype to continue working will be removed. |
|
47 |
|
48 * The ``Message`` model (in ``django.contrib.auth``), its related |
|
49 manager in the ``User`` model (``user.message_set``), and the |
|
50 associated methods (``user.message_set.create()`` and |
|
51 ``user.get_and_delete_messages()``), which have |
|
52 been deprecated since the 1.2 release, will be removed. The |
|
53 :doc:`messages framework </ref/contrib/messages>` should be used |
|
54 instead. |
|
55 |
|
56 * Authentication backends need to support the ``obj`` parameter for |
|
57 permission checking. The ``supports_object_permissions`` variable |
|
58 is not checked any longer and can be removed. |
|
59 |
|
60 * Authentication backends need to support the ``AnonymousUser`` |
|
61 being passed to all methods dealing with permissions. |
|
62 The ``supports_anonymous_user`` variable is not checked any |
|
63 longer and can be removed. |
|
64 |
|
65 * The ability to specify a callable template loader rather than a |
|
66 ``Loader`` class will be removed, as will the ``load_template_source`` |
|
67 functions that are included with the built in template loaders for |
|
68 backwards compatibility. These have been deprecated since the 1.2 |
|
69 release. |
|
70 |
|
71 * ``django.utils.translation.get_date_formats()`` and |
|
72 ``django.utils.translation.get_partial_date_formats()``. These |
|
73 functions are replaced by the new locale aware formatting; use |
|
74 ``django.utils.formats.get_format()`` to get the appropriate |
|
75 formats. |
|
76 |
|
77 * In ``django.forms.fields``: ``DEFAULT_DATE_INPUT_FORMATS``, |
|
78 ``DEFAULT_TIME_INPUT_FORMATS`` and |
|
79 ``DEFAULT_DATETIME_INPUT_FORMATS``. Use |
|
80 ``django.utils.formats.get_format()`` to get the appropriate |
|
81 formats. |
|
82 |
|
83 * The ability to use a function-based test runners will be removed, |
|
84 along with the ``django.test.simple.run_tests()`` test runner. |
|
85 |
|
86 * The ``views.feed()`` view and ``feeds.Feed`` class in |
|
87 ``django.contrib.syndication`` have been deprecated since the 1.2 |
|
88 release. The class-based view ``views.Feed`` should be used instead. |
|
89 |
|
90 * ``django.core.context_processors.auth``. This release will |
|
91 remove the old method in favor of the new method in |
|
92 ``django.contrib.auth.context_processors.auth``. This has been |
|
93 deprecated since the 1.2 release. |
|
94 |
|
95 * The ``postgresql`` database backend has been deprecated in favor of |
|
96 the ``postgresql_psycopg2`` backend. |
|
97 |
|
98 * The ``no`` language code has been deprecated in favor of the ``nb`` |
|
99 language code. |
|
100 |
|
101 * 2.0 |
|
102 * ``django.views.defaults.shortcut()``. This function has been moved |
|
103 to ``django.contrib.contenttypes.views.shortcut()`` as part of the |
|
104 goal of removing all ``django.contrib`` references from the core |
|
105 Django codebase. The old shortcut will be removed in the 2.0 |
|
106 release. |