5.2.txt 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. ============================================
  2. Django 5.2 release notes - UNDER DEVELOPMENT
  3. ============================================
  4. *Expected April 2025*
  5. Welcome to Django 5.2!
  6. These release notes cover the :ref:`new features <whats-new-5.2>`, as well as
  7. some :ref:`backwards incompatible changes <backwards-incompatible-5.2>` you
  8. should be aware of when upgrading from Django 5.1 or earlier. We've
  9. :ref:`begun the deprecation process for some features
  10. <deprecated-features-5.2>`.
  11. See the :doc:`/howto/upgrade-version` guide if you're updating an existing
  12. project.
  13. Django 5.2 is designated as a :term:`long-term support release
  14. <Long-term support release>`. It will receive security updates for at least
  15. three years after its release. Support for the previous LTS, Django 4.2, will
  16. end in April 2026.
  17. Python compatibility
  18. ====================
  19. Django 5.2 supports Python 3.10, 3.11, 3.12, and 3.13. We **highly recommend**
  20. and only officially support the latest release of each series.
  21. .. _whats-new-5.2:
  22. What's new in Django 5.2
  23. ========================
  24. Minor features
  25. --------------
  26. :mod:`django.contrib.admin`
  27. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  28. * The ``admin/base.html`` template now has a new block
  29. :ref:`extrabody <extrabody>` for adding custom code before the closing
  30. ``</body>`` tag.
  31. :mod:`django.contrib.admindocs`
  32. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  33. * ...
  34. :mod:`django.contrib.auth`
  35. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  36. * The default iteration count for the PBKDF2 password hasher is increased from
  37. 870,000 to 1,000,000.
  38. :mod:`django.contrib.contenttypes`
  39. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  40. * ...
  41. :mod:`django.contrib.gis`
  42. ~~~~~~~~~~~~~~~~~~~~~~~~~
  43. * ...
  44. :mod:`django.contrib.messages`
  45. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  46. * ...
  47. :mod:`django.contrib.postgres`
  48. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  49. * ...
  50. :mod:`django.contrib.redirects`
  51. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  52. * ...
  53. :mod:`django.contrib.sessions`
  54. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  55. * ...
  56. :mod:`django.contrib.sitemaps`
  57. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  58. * ...
  59. :mod:`django.contrib.sites`
  60. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  61. * ...
  62. :mod:`django.contrib.staticfiles`
  63. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  64. * ...
  65. :mod:`django.contrib.syndication`
  66. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  67. * All :class:`~django.utils.feedgenerator.SyndicationFeed` classes now support
  68. a ``stylesheets`` attribute. If specified, an ``<? xml-stylesheet ?>``
  69. processing instruction will be added to the top of the document for each
  70. stylesheet in the given list. See :ref:`feed-stylesheets` for more details.
  71. Asynchronous views
  72. ~~~~~~~~~~~~~~~~~~
  73. * ...
  74. Cache
  75. ~~~~~
  76. * ...
  77. CSRF
  78. ~~~~
  79. * ...
  80. Database backends
  81. ~~~~~~~~~~~~~~~~~
  82. * ...
  83. Decorators
  84. ~~~~~~~~~~
  85. * ...
  86. Email
  87. ~~~~~
  88. * Tuple items of :class:`EmailMessage.attachments
  89. <django.core.mail.EmailMessage>` and
  90. :class:`EmailMultiAlternatives.attachments
  91. <django.core.mail.EmailMultiAlternatives>` are now named tuples, as opposed
  92. to regular tuples.
  93. * :attr:`EmailMultiAlternatives.alternatives
  94. <django.core.mail.EmailMultiAlternatives.alternatives>` is now a list of
  95. named tuples, as opposed to regular tuples.
  96. * The new :meth:`~django.core.mail.EmailMultiAlternatives.body_contains` method
  97. returns a boolean indicating whether a provided text is contained in the
  98. email ``body`` and in all attached MIME type ``text/*`` alternatives.
  99. Error Reporting
  100. ~~~~~~~~~~~~~~~
  101. * The attribute :attr:`.SafeExceptionReporterFilter.hidden_settings` now
  102. treats values as sensitive if their name includes ``AUTH``.
  103. File Storage
  104. ~~~~~~~~~~~~
  105. * ...
  106. File Uploads
  107. ~~~~~~~~~~~~
  108. * ...
  109. Forms
  110. ~~~~~
  111. * The new :class:`~django.forms.ColorInput` form widget is for entering a color
  112. in ``rrggbb`` hexadecimal format and renders as ``<input type='color' ...>``.
  113. Some browsers support a visual color picker interface for this input type.
  114. * The new :class:`~django.forms.SearchInput` form widget is for entering search
  115. queries and renders as ``<input type="search" ...>``.
  116. * The new :class:`~django.forms.TelInput` form widget is for entering telephone
  117. numbers and renders as ``<input type="tel" ...>``.
  118. Generic Views
  119. ~~~~~~~~~~~~~
  120. * ...
  121. Internationalization
  122. ~~~~~~~~~~~~~~~~~~~~
  123. * ...
  124. Logging
  125. ~~~~~~~
  126. * ...
  127. Management Commands
  128. ~~~~~~~~~~~~~~~~~~~
  129. * ...
  130. Migrations
  131. ~~~~~~~~~~
  132. * ...
  133. Models
  134. ~~~~~~
  135. * The ``SELECT`` clause generated when using
  136. :meth:`QuerySet.values()<django.db.models.query.QuerySet.values>` and
  137. :meth:`~django.db.models.query.QuerySet.values_list` now matches the
  138. specified order of the referenced expressions. Previously the order was based
  139. of a set of counterintuitive rules which made query combination through
  140. methods such as
  141. :meth:`QuerySet.union()<django.db.models.query.QuerySet.union>` unpredictable.
  142. Requests and Responses
  143. ~~~~~~~~~~~~~~~~~~~~~~
  144. * ...
  145. Security
  146. ~~~~~~~~
  147. * ...
  148. Serialization
  149. ~~~~~~~~~~~~~
  150. * ...
  151. Signals
  152. ~~~~~~~
  153. * ...
  154. Templates
  155. ~~~~~~~~~
  156. * ...
  157. Tests
  158. ~~~~~
  159. * ...
  160. URLs
  161. ~~~~
  162. * ...
  163. Utilities
  164. ~~~~~~~~~
  165. * ...
  166. Validators
  167. ~~~~~~~~~~
  168. * ...
  169. .. _backwards-incompatible-5.2:
  170. Backwards incompatible changes in 5.2
  171. =====================================
  172. Database backend API
  173. --------------------
  174. This section describes changes that may be needed in third-party database
  175. backends.
  176. * ...
  177. :mod:`django.contrib.gis`
  178. -------------------------
  179. * Support for PostGIS 3.0 is removed.
  180. Dropped support for PostgreSQL 13
  181. ---------------------------------
  182. Upstream support for PostgreSQL 13 ends in November 2025. Django 5.2 supports
  183. PostgreSQL 14 and higher.
  184. Miscellaneous
  185. -------------
  186. * ...
  187. .. _deprecated-features-5.2:
  188. Features deprecated in 5.2
  189. ==========================
  190. Miscellaneous
  191. -------------
  192. * The ``all`` argument for the ``django.contrib.staticfiles.finders.find()``
  193. function is deprecated in favor of the ``find_all`` argument.