2.1.txt 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. ============================================
  2. Django 2.1 release notes - UNDER DEVELOPMENT
  3. ============================================
  4. Welcome to Django 2.1!
  5. These release notes cover the :ref:`new features <whats-new-2.1>`, as well as
  6. some :ref:`backwards incompatible changes <backwards-incompatible-2.1>` you'll
  7. want to be aware of when upgrading from Django 2.0 or earlier. We've
  8. :ref:`dropped some features<removed-features-2.1>` that have reached the end of
  9. their deprecation cycle, and we've :ref:`begun the deprecation process for some
  10. features <deprecated-features-2.1>`.
  11. See the :doc:`/howto/upgrade-version` guide if you're updating an existing
  12. project.
  13. Python compatibility
  14. ====================
  15. Django 2.1 supports Python 3.5, 3.6, and 3.7. Django 2.0 is the last version to
  16. support Python 3.4. We **highly recommend** and only officially support the
  17. latest release of each series.
  18. .. _whats-new-2.1:
  19. What's new in Django 2.1
  20. ========================
  21. Minor features
  22. --------------
  23. :mod:`django.contrib.admin`
  24. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  25. * :attr:`.ModelAdmin.search_fields` now accepts any lookup such as
  26. ``field__exact``.
  27. :mod:`django.contrib.admindocs`
  28. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  29. * ...
  30. :mod:`django.contrib.auth`
  31. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  32. * :djadmin:`createsuperuser` now gives a prompt to allow bypassing the
  33. :setting:`AUTH_PASSWORD_VALIDATORS` checks.
  34. :mod:`django.contrib.contenttypes`
  35. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  36. * ...
  37. :mod:`django.contrib.gis`
  38. ~~~~~~~~~~~~~~~~~~~~~~~~~
  39. * ...
  40. :mod:`django.contrib.messages`
  41. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  42. * ...
  43. :mod:`django.contrib.postgres`
  44. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  45. * ...
  46. :mod:`django.contrib.redirects`
  47. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  48. * ...
  49. :mod:`django.contrib.sessions`
  50. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  51. * ...
  52. :mod:`django.contrib.sitemaps`
  53. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  54. * ...
  55. :mod:`django.contrib.sites`
  56. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  57. * ...
  58. :mod:`django.contrib.staticfiles`
  59. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  60. * ...
  61. :mod:`django.contrib.syndication`
  62. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  63. * ...
  64. Cache
  65. ~~~~~
  66. * ...
  67. CSRF
  68. ~~~~
  69. * ...
  70. Database backends
  71. ~~~~~~~~~~~~~~~~~
  72. * ...
  73. Email
  74. ~~~~~
  75. * ...
  76. File Storage
  77. ~~~~~~~~~~~~
  78. * ...
  79. File Uploads
  80. ~~~~~~~~~~~~
  81. * ...
  82. Forms
  83. ~~~~~
  84. * ...
  85. Generic Views
  86. ~~~~~~~~~~~~~
  87. * ...
  88. Internationalization
  89. ~~~~~~~~~~~~~~~~~~~~
  90. * ...
  91. Management Commands
  92. ~~~~~~~~~~~~~~~~~~~
  93. * ...
  94. Migrations
  95. ~~~~~~~~~~
  96. * Added support for serialization of ``functools.partialmethod`` objects.
  97. Models
  98. ~~~~~~
  99. * Models can now use ``__init_subclass__()`` from :pep:`487`.
  100. * A ``BinaryField`` may now be set to ``editable=True`` if you wish to include
  101. it in model forms.
  102. Requests and Responses
  103. ~~~~~~~~~~~~~~~~~~~~~~
  104. * Added :meth:`.HttpRequest.get_full_path_info`.
  105. Serialization
  106. ~~~~~~~~~~~~~
  107. * ...
  108. Signals
  109. ~~~~~~~
  110. * ...
  111. Templates
  112. ~~~~~~~~~
  113. * ...
  114. Tests
  115. ~~~~~
  116. * ...
  117. URLs
  118. ~~~~
  119. * ...
  120. Validators
  121. ~~~~~~~~~~
  122. * ...
  123. .. _backwards-incompatible-2.1:
  124. Backwards incompatible changes in 2.1
  125. =====================================
  126. Database backend API
  127. --------------------
  128. * To adhere to :pep:`249`, exceptions where a database doesn't support a
  129. feature are changed from :exc:`NotImplementedError` to
  130. :exc:`django.db.NotSupportedError`.
  131. :mod:`django.contrib.gis`
  132. -------------------------
  133. * Support for SpatiaLite 4.0 is removed.
  134. Dropped support for MySQL 5.5
  135. -----------------------------
  136. The end of upstream support for MySQL 5.5 is December 2018. Django 2.1 supports
  137. MySQL 5.6 and higher.
  138. Dropped support for PostgreSQL 9.3
  139. ----------------------------------
  140. The end of upstream support for PostgreSQL 9.3 is September 2018. Django 2.1
  141. supports PostgreSQL 9.4 and higher.
  142. Miscellaneous
  143. -------------
  144. * ...
  145. .. _deprecated-features-2.1:
  146. Features deprecated in 2.1
  147. ==========================
  148. Miscellaneous
  149. -------------
  150. * ...
  151. .. _removed-features-2.1:
  152. Features removed in 2.1
  153. =======================
  154. These features have reached the end of their deprecation cycle and are removed
  155. in Django 2.1. See :ref:`deprecated-features-1.11` for details, including how
  156. to remove usage of these features.
  157. in Django 2.1. See :ref:`deprecated-features-1.11` and for details, including
  158. how to remove usage of these features.
  159. * ``contrib.auth.views.login()``, ``logout()``, ``password_change()``,
  160. ``password_change_done()``, ``password_reset()``, ``password_reset_done()``,
  161. ``password_reset_confirm()``, and ``password_reset_complete()`` are removed.
  162. * The ``extra_context`` parameter of ``contrib.auth.views.logout_then_login()``
  163. is removed.
  164. * ``django.test.runner.setup_databases()`` is removed.
  165. * ``django.utils.translation.string_concat()`` is removed.
  166. * ``django.core.cache.backends.memcached.PyLibMCCache`` no longer supports
  167. passing ``pylibmc`` behavior settings as top-level attributes of ``OPTIONS``.
  168. * The ``host`` parameter of ``django.utils.http.is_safe_url()`` is removed.
  169. * Silencing of exceptions raised while rendering the ``{% include %}`` template
  170. tag is removed.
  171. * ``DatabaseIntrospection.get_indexes()`` is removed.
  172. * The ``authenticate()`` method of authentication backends requires ``request``
  173. as the first positional argument.
  174. * The ``django.db.models.permalink()`` decorator is removed.
  175. * The ``USE_ETAGS`` setting is removed. ``CommonMiddleware`` and
  176. ``django.utils.cache.patch_response_headers()`` no longer set ETags.
  177. * The ``Model._meta.has_auto_field`` attribute is removed.
  178. * Support for regular expression groups with ``iLmsu#`` in ``url()`` is removed.
  179. * Support for ``Widget.render()`` methods without the ``renderer`` argument
  180. is removed.