1.11.txt 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. =============================================
  2. Django 1.11 release notes - UNDER DEVELOPMENT
  3. =============================================
  4. Welcome to Django 1.11!
  5. These release notes cover the :ref:`new features <whats-new-1.11>`, as well as
  6. some :ref:`backwards incompatible changes <backwards-incompatible-1.11>` you'll
  7. want to be aware of when upgrading from Django 1.10 or older versions. We've
  8. :ref:`begun the deprecation process for some features
  9. <deprecated-features-1.11>`.
  10. See the :doc:`/howto/upgrade-version` guide if you're updating an existing
  11. project.
  12. Django 1.11 is designated as a :term:`long-term support release`. It will
  13. receive security updates for at least three years after its release. Support
  14. for the previous LTS, Django 1.8, will end 6 months after the release date of
  15. Django 1.11.
  16. Python compatibility
  17. ====================
  18. Like Django 1.10, Django 1.11 requires Python 2.7, 3.4, or 3.5. We **highly
  19. recommend** and only officially support the latest release of each series.
  20. The Django 1.11.x series is the last to support Python 2. The next major
  21. release, Django 2.0, will only support Python 3.5+.
  22. Deprecating warnings are no longer loud by default
  23. ==================================================
  24. Unlike older versions of Django, Django's own deprecation warnings are no
  25. longer displayed by default. This is consistent with Python's default behavior.
  26. This change allows third-party apps to support both Django 1.11 LTS and Django
  27. 1.8 LTS without having to add code to avoid deprecation warnings.
  28. Following the release of Django 2.0, we suggest that third-party app authors
  29. drop support for all versions of Django prior to 1.11. At that time, you should
  30. be able run your package's tests using ``python -Wd`` so that deprecation
  31. warnings do appear. After making the deprecation warning fixes, your app should
  32. be compatible with Django 2.0.
  33. .. _whats-new-1.11:
  34. What's new in Django 1.11
  35. =========================
  36. Minor features
  37. --------------
  38. :mod:`django.contrib.admin`
  39. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  40. * :attr:`.ModelAdmin.date_hierarchy` can now reference fields across relations.
  41. :mod:`django.contrib.admindocs`
  42. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  43. * ...
  44. :mod:`django.contrib.auth`
  45. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  46. * The default iteration count for the PBKDF2 password hasher is increased by
  47. 20%.
  48. :mod:`django.contrib.contenttypes`
  49. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  50. * ...
  51. :mod:`django.contrib.gis`
  52. ~~~~~~~~~~~~~~~~~~~~~~~~~
  53. * ...
  54. :mod:`django.contrib.messages`
  55. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  56. * ...
  57. :mod:`django.contrib.postgres`
  58. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  59. * The new ``distinct`` argument for
  60. :class:`~django.contrib.postgres.aggregates.StringAgg` determines if
  61. concatenated values will be distinct.
  62. :mod:`django.contrib.redirects`
  63. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  64. * ...
  65. :mod:`django.contrib.sessions`
  66. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  67. * ...
  68. :mod:`django.contrib.sitemaps`
  69. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  70. * ...
  71. :mod:`django.contrib.sites`
  72. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  73. * ...
  74. :mod:`django.contrib.staticfiles`
  75. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  76. * ...
  77. :mod:`django.contrib.syndication`
  78. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  79. * ...
  80. Cache
  81. ~~~~~
  82. * ...
  83. CSRF
  84. ~~~~
  85. * ...
  86. Database backends
  87. ~~~~~~~~~~~~~~~~~
  88. * ...
  89. Email
  90. ~~~~~
  91. * Added the :setting:`EMAIL_USE_LOCALTIME` setting to allow sending SMTP date
  92. headers in the local time zone rather than in UTC.
  93. File Storage
  94. ~~~~~~~~~~~~
  95. * To make it wrappable by :class:`io.TextIOWrapper`,
  96. :class:`~django.core.files.File` now has the ``readable()``, ``writable()``,
  97. and ``seekable()`` methods.
  98. File Uploads
  99. ~~~~~~~~~~~~
  100. * ...
  101. Forms
  102. ~~~~~
  103. * The new :attr:`CharField.empty_value <django.forms.CharField.empty_value>`
  104. attribute allows specifying the Python value to use to represent "empty".
  105. Generic Views
  106. ~~~~~~~~~~~~~
  107. * ...
  108. Internationalization
  109. ~~~~~~~~~~~~~~~~~~~~
  110. * ...
  111. Management Commands
  112. ~~~~~~~~~~~~~~~~~~~
  113. * The new :option:`loaddata --exclude` option allows excluding models and apps
  114. while loading data from fixtures.
  115. Migrations
  116. ~~~~~~~~~~
  117. * ...
  118. Models
  119. ~~~~~~
  120. * Added support for callable values in the ``defaults`` argument of
  121. :meth:`QuerySet.update_or_create()
  122. <django.db.models.query.QuerySet.update_or_create>` and
  123. :meth:`~django.db.models.query.QuerySet.get_or_create`.
  124. Requests and Responses
  125. ~~~~~~~~~~~~~~~~~~~~~~
  126. * Added :meth:`QueryDict.fromkeys() <django.http.QueryDict.fromkeys>`.
  127. Serialization
  128. ~~~~~~~~~~~~~
  129. * The new ``django.core.serializers.base.Serializer.stream_class`` attribute
  130. allows subclasses to customize the default stream.
  131. Signals
  132. ~~~~~~~
  133. * ...
  134. Templates
  135. ~~~~~~~~~
  136. * :meth:`~django.utils.safestring.mark_safe` can now be used as a decorator.
  137. Tests
  138. ~~~~~
  139. * ...
  140. URLs
  141. ~~~~
  142. * ...
  143. Validators
  144. ~~~~~~~~~~
  145. * ...
  146. .. _backwards-incompatible-1.11:
  147. Backwards incompatible changes in 1.11
  148. ======================================
  149. :mod:`django.contrib.gis`
  150. -------------------------
  151. * To simplify the codebase and because it's easier to install than when
  152. ``contrib.gis`` was first released, :ref:`gdalbuild` is now a required
  153. dependency for GeoDjango. In older versions, it's only required for SQLite.
  154. Database backend API
  155. --------------------
  156. * ...
  157. Dropped support for PostgreSQL 9.2 and PostGIS 2.0
  158. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  159. Upstream support for PostgreSQL 9.2 ends in September 2017. As a consequence,
  160. Django 1.11 sets PostgreSQL 9.3 as the minimum version it officially supports.
  161. Support for PostGIS 2.0 is also removed as PostgreSQL 9.2 is the last version
  162. to support it.
  163. Miscellaneous
  164. -------------
  165. * If no items in the feed have a ``pubdate`` or ``updateddate`` attribute,
  166. :meth:`SyndicationFeed.latest_post_date()
  167. <django.utils.feedgenerator.SyndicationFeed.latest_post_date>` now returns
  168. the current UTC date/time, instead of a datetime without any timezone
  169. information.
  170. * Support for SpatiaLite < 4.0 is dropped.
  171. * CSRF failures are logged to the ``django.security.csrf ``` logger instead of
  172. ``django.request``.
  173. * :setting:`ALLOWED_HOSTS` validation is no longer disabled when running tests.
  174. If your application includes tests with custom host names, you must include
  175. those host names in :setting:`ALLOWED_HOSTS`. See
  176. :ref:`topics-testing-advanced-multiple-hosts`.
  177. * Using a foreign key's id (e.g. ``'field_id'``) in ``ModelAdmin.list_display``
  178. displays the related object's ID. Remove the ``_id`` suffix if you want the
  179. old behavior of the string representation of the object.
  180. * In model forms, :class:`~django.db.models.CharField` with ``null=True`` now
  181. saves ``NULL`` for blank values instead of empty strings.
  182. * On Oracle, :meth:`Model.validate_unique()
  183. <django.db.models.Model.validate_unique>` no longer checks empty strings for
  184. uniqueness as the database interprets the value as ``NULL``.
  185. .. _deprecated-features-1.11:
  186. Features deprecated in 1.11
  187. ===========================
  188. Miscellaneous
  189. -------------
  190. * ...