deprecation.txt 4.9 KB

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