1.10.txt 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  1. =============================================
  2. Django 1.10 release notes - UNDER DEVELOPMENT
  3. =============================================
  4. Welcome to Django 1.10!
  5. These release notes cover the `new features`_, as well as some `backwards
  6. incompatible changes`_ you'll want to be aware of when upgrading from Django
  7. 1.9 or older versions. We've :ref:`dropped some features<removed-features-1.10>`
  8. that have reached the end of their deprecation cycle, and we've `begun the
  9. deprecation process for some features`_.
  10. .. _`new features`: `What's new in Django 1.10`_
  11. .. _`backwards incompatible changes`: `Backwards incompatible changes in 1.10`_
  12. .. _`dropped some features`: `Features removed in 1.10`_
  13. .. _`begun the deprecation process for some features`: `Features deprecated in 1.10`_
  14. Python compatibility
  15. ====================
  16. Like Django 1.9, Django 1.10 requires Python 2.7, 3.4, or 3.5. We **highly
  17. recommend** and only officially support the latest release of each series.
  18. What's new in Django 1.10
  19. =========================
  20. ...
  21. Minor features
  22. ~~~~~~~~~~~~~~
  23. :mod:`django.contrib.admin`
  24. ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  25. * ...
  26. :mod:`django.contrib.admindocs`
  27. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  28. * ...
  29. :mod:`django.contrib.auth`
  30. ^^^^^^^^^^^^^^^^^^^^^^^^^^
  31. * The default iteration count for the PBKDF2 password hasher has been increased
  32. by 25%. This backwards compatible change will not affect users who have
  33. subclassed ``django.contrib.auth.hashers.PBKDF2PasswordHasher`` to change the
  34. default value.
  35. * The :func:`~django.contrib.auth.views.logout` view sends "no-cache" headers
  36. to prevent an issue where Safari caches redirects and prevents a user from
  37. being able to log out.
  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. * The :djadmin:`clearsessions` management command now removes file-based
  56. sessions.
  57. :mod:`django.contrib.sitemaps`
  58. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  59. * ...
  60. :mod:`django.contrib.sites`
  61. ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  62. * ...
  63. :mod:`django.contrib.staticfiles`
  64. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  65. * ...
  66. :mod:`django.contrib.syndication`
  67. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  68. * ...
  69. Cache
  70. ^^^^^
  71. * ...
  72. CSRF
  73. ^^^^
  74. * ...
  75. Database backends
  76. ^^^^^^^^^^^^^^^^^
  77. * ...
  78. Email
  79. ^^^^^
  80. * ...
  81. File Storage
  82. ^^^^^^^^^^^^
  83. * ...
  84. File Uploads
  85. ^^^^^^^^^^^^
  86. * ...
  87. Forms
  88. ^^^^^
  89. * ...
  90. Generic Views
  91. ^^^^^^^^^^^^^
  92. * ...
  93. Internationalization
  94. ^^^^^^^^^^^^^^^^^^^^
  95. * ...
  96. Management Commands
  97. ^^^^^^^^^^^^^^^^^^^
  98. * The new :djadminopt:`--fail-level` option of the :djadmin:`check` command
  99. allows specifying the message level that will cause the command to exit with
  100. a non-zero status.
  101. Migrations
  102. ^^^^^^^^^^
  103. * ...
  104. Models
  105. ^^^^^^
  106. * ...
  107. Requests and Responses
  108. ^^^^^^^^^^^^^^^^^^^^^^
  109. * Added ``request.user`` to the debug view.
  110. Serialization
  111. ^^^^^^^^^^^^^
  112. * The ``django.core.serializers.json.DjangoJSONEncoder`` now knows how to
  113. serialize lazy strings, typically used for translatable content.
  114. Signals
  115. ^^^^^^^
  116. * ...
  117. Templates
  118. ^^^^^^^^^
  119. * ...
  120. Tests
  121. ^^^^^
  122. * ...
  123. URLs
  124. ^^^^
  125. * ...
  126. Validators
  127. ^^^^^^^^^^
  128. * ...
  129. Backwards incompatible changes in 1.10
  130. ======================================
  131. .. warning::
  132. In addition to the changes outlined in this section, be sure to review the
  133. :ref:`removed-features-1.10` for the features that have reached the end of
  134. their deprecation cycle and therefore been removed. If you haven't updated
  135. your code within the deprecation timeline for a given feature, its removal
  136. may appear as a backwards incompatible change.
  137. Database backend API
  138. ~~~~~~~~~~~~~~~~~~~~
  139. * ...
  140. Miscellaneous
  141. ~~~~~~~~~~~~~
  142. * The ``repr()`` of a ``QuerySet`` is wrapped in ```<QuerySet >`` to
  143. disambiguate it from a plain list when debugging.
  144. .. _deprecated-features-1.10:
  145. Features deprecated in 1.10
  146. ===========================
  147. Miscellaneous
  148. ~~~~~~~~~~~~~
  149. * ...
  150. .. _removed-features-1.10:
  151. Features removed in 1.10
  152. ========================
  153. These features have reached the end of their deprecation cycle and so have been
  154. removed in Django 1.10 (please see the :ref:`deprecation timeline
  155. <deprecation-removed-in-1.10>` for more details):
  156. * Support for calling a ``SQLCompiler`` directly as an alias for calling its
  157. ``quote_name_unless_alias`` method is removed.
  158. * The ``cycle`` and ``firstof`` template tags are removed from the ``future``
  159. template tag library.
  160. * ``django.conf.urls.patterns()`` is removed.
  161. * Support for the ``prefix`` argument to
  162. ``django.conf.urls.i18n.i18n_patterns()`` is removed.
  163. * ``SimpleTestCase.urls`` is removed.
  164. * Using an incorrect count of unpacked values in the ``for`` template tag
  165. raises an exception rather than failing silently.
  166. * The ability to :func:`~django.core.urlresolvers.reverse` URLs using a dotted
  167. Python path is removed.
  168. * Support for ``optparse`` is dropped for custom management commands.
  169. * The class ``django.core.management.NoArgsCommand`` is removed.
  170. * ``django.core.context_processors`` module is removed.
  171. * ``django.db.models.sql.aggregates`` module is removed.
  172. * ``django.contrib.gis.db.models.sql.aggregates`` module is removed.
  173. * The following methods and properties of ``django.db.sql.query.Query`` are
  174. removed:
  175. * Properties: ``aggregates`` and ``aggregate_select``
  176. * Methods: ``add_aggregate``, ``set_aggregate_mask``, and
  177. ``append_aggregate_mask``.
  178. * ``django.template.resolve_variable`` is removed.
  179. * The following private APIs are removed from
  180. :class:`django.db.models.options.Options` (``Model._meta``):
  181. * ``get_field_by_name()``
  182. * ``get_all_field_names()``
  183. * ``get_fields_with_model()``
  184. * ``get_concrete_fields_with_model()``
  185. * ``get_m2m_with_model()``
  186. * ``get_all_related_objects()``
  187. * ``get_all_related_objects_with_model()``
  188. * ``get_all_related_many_to_many_objects()``
  189. * ``get_all_related_m2m_objects_with_model()``
  190. * The ``error_message`` argument of ``django.forms.RegexField`` is removed.
  191. * The ``unordered_list`` filter no longer supports old style lists.
  192. * Support for string ``view`` arguments to ``url()`` is removed.
  193. * The backward compatible shim to rename ``django.forms.Form._has_changed()``
  194. to ``has_changed()`` is removed.
  195. * The ``removetags`` template filter is removed.
  196. * The ``remove_tags()`` and ``strip_entities()`` functions in
  197. ``django.utils.html`` is removed.
  198. * The ``is_admin_site`` argument to
  199. ``django.contrib.auth.views.password_reset()`` is removed.
  200. * ``django.db.models.field.subclassing.SubfieldBase`` is removed.
  201. * ``django.utils.checksums`` is removed.
  202. * The ``original_content_type_id`` attribute on
  203. ``django.contrib.admin.helpers.InlineAdminForm`` is removed.
  204. * The backwards compatibility shim to allow ``FormMixin.get_form()`` to be
  205. defined with no default value for its ``form_class`` argument is removed.
  206. * The following settings are removed:
  207. * ``ALLOWED_INCLUDE_ROOTS``
  208. * ``TEMPLATE_CONTEXT_PROCESSORS``
  209. * ``TEMPLATE_DEBUG``
  210. * ``TEMPLATE_DIRS``
  211. * ``TEMPLATE_LOADERS``
  212. * ``TEMPLATE_STRING_IF_INVALID``
  213. * The backwards compatibility alias ``django.template.loader.BaseLoader`` is
  214. removed.
  215. * Django template objects returned by
  216. :func:`~django.template.loader.get_template` and
  217. :func:`~django.template.loader.select_template` no longer accept a
  218. :class:`~django.template.Context` in their
  219. :meth:`~django.template.backends.base.Template.render()` method.
  220. * :doc:`Template response APIs </ref/template-response>` enforce the use of
  221. :class:`dict` and backend-dependent template objects instead of
  222. :class:`~django.template.Context` and :class:`~django.template.Template`
  223. respectively.
  224. * The ``current_app`` parameter for the following function and classes is
  225. removed:
  226. * ``django.shortcuts.render()``
  227. * ``django.template.Context()``
  228. * ``django.template.RequestContext()``
  229. * ``django.template.response.TemplateResponse()``
  230. * The ``dictionary`` and ``context_instance`` parameters for the following
  231. functions are removed:
  232. * ``django.shortcuts.render()``
  233. * ``django.shortcuts.render_to_response()``
  234. * ``django.template.loader.render_to_string()``
  235. * The ``dirs`` parameter for the following functions is removed:
  236. * ``django.template.loader.get_template()``
  237. * ``django.template.loader.select_template()``
  238. * ``django.shortcuts.render()``
  239. * ``django.shortcuts.render_to_response()``
  240. * Session verification is enabled regardless of whether or not
  241. ``'django.contrib.auth.middleware.SessionAuthenticationMiddleware'`` is in
  242. ``MIDDLEWARE_CLASSES``. ``SessionAuthenticationMiddleware`` no longer has
  243. any purpose and can be removed from ``MIDDLEWARE_CLASSES``. It's kept as
  244. a stub until Django 2.0 as a courtesy for users who don't read this note.
  245. * Private attribute ``django.db.models.Field.related`` is removed.
  246. * The ``--list`` option of the ``migrate`` management command is removed.
  247. * The ``ssi`` template tag is removed.
  248. * Support for the ``=`` comparison operator in the ``if`` template tag is
  249. removed.
  250. * The backwards compatibility shims to allow ``Storage.get_available_name()``
  251. and ``Storage.save()`` to be defined without a ``max_length`` argument are
  252. removed.
  253. * Support for the legacy ``%(<foo>)s`` syntax in ``ModelFormMixin.success_url``
  254. is removed.
  255. * ``GeoQuerySet`` aggregate methods ``collect()``, ``extent()``, ``extent3d()``,
  256. ``make_line()``, and ``unionagg()`` are removed.
  257. * The ability to specify ``ContentType.name`` when creating a content type
  258. instance is removed.
  259. * Support for the old signature of ``allow_migrate`` is removed.
  260. * Support for the syntax of ``{% cycle %}`` that uses comma-separated arguments
  261. is removed.
  262. * The warning that :class:`~django.core.signing.Signer` issued when given an
  263. invalid separator is now a ``ValueError``.