1.9.txt 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. ============================================
  2. Django 1.9 release notes - UNDER DEVELOPMENT
  3. ============================================
  4. Welcome to Django 1.9!
  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.8 or older versions. We've :ref:`dropped some features
  8. <deprecation-removed-in-1.9>` that have reached the end of their deprecation
  9. cycle, and we've `begun the deprecation process for some features`_.
  10. .. _`new features`: `What's new in Django 1.9`_
  11. .. _`backwards incompatible changes`: `Backwards incompatible changes in 1.9`_
  12. .. _`dropped some features`: `Features removed in 1.9`_
  13. .. _`begun the deprecation process for some features`: `Features deprecated in 1.9`_
  14. Python compatibility
  15. ====================
  16. Like Django 1.8, Django 1.9 requires Python 2.7 or above, though we
  17. **highly recommend** the latest minor release. We've dropped support for
  18. Python 3.2 and added support for Python 3.5.
  19. What's new in Django 1.9
  20. ========================
  21. ...
  22. Minor features
  23. ~~~~~~~~~~~~~~
  24. :mod:`django.contrib.admin`
  25. ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  26. * Admin views now have ``model_admin`` or ``admin_site`` attributes.
  27. :mod:`django.contrib.auth`
  28. ^^^^^^^^^^^^^^^^^^^^^^^^^^
  29. * The default iteration count for the PBKDF2 password hasher has been increased
  30. by 20%. This backwards compatible change will not affect users who have
  31. subclassed ``django.contrib.auth.hashers.PBKDF2PasswordHasher`` to change the
  32. default value.
  33. :mod:`django.contrib.gis`
  34. ^^^^^^^^^^^^^^^^^^^^^^^^^^
  35. * ...
  36. :mod:`django.contrib.messages`
  37. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  38. * ...
  39. :mod:`django.contrib.redirects`
  40. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  41. * ...
  42. :mod:`django.contrib.sessions`
  43. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  44. * ...
  45. :mod:`django.contrib.sitemaps`
  46. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  47. * ...
  48. :mod:`django.contrib.sites`
  49. ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  50. * ...
  51. :mod:`django.contrib.staticfiles`
  52. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  53. * ...
  54. :mod:`django.contrib.syndication`
  55. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  56. * ...
  57. Cache
  58. ^^^^^
  59. * ...
  60. Email
  61. ^^^^^
  62. * ...
  63. File Storage
  64. ^^^^^^^^^^^^
  65. * ...
  66. File Uploads
  67. ^^^^^^^^^^^^
  68. * ...
  69. Forms
  70. ^^^^^
  71. * ...
  72. Generic Views
  73. ^^^^^^^^^^^^^
  74. * Class based views generated using ``as_view()`` now have ``view_class``
  75. and ``view_initkwargs`` attributes.
  76. Internationalization
  77. ^^^^^^^^^^^^^^^^^^^^
  78. * ...
  79. Management Commands
  80. ^^^^^^^^^^^^^^^^^^^
  81. * ...
  82. Models
  83. ^^^^^^
  84. * ...
  85. Signals
  86. ^^^^^^^
  87. * ...
  88. Templates
  89. ^^^^^^^^^
  90. * ...
  91. Requests and Responses
  92. ^^^^^^^^^^^^^^^^^^^^^^
  93. * ...
  94. Tests
  95. ^^^^^
  96. * ...
  97. Validators
  98. ^^^^^^^^^^
  99. * ...
  100. Backwards incompatible changes in 1.9
  101. =====================================
  102. .. warning::
  103. In addition to the changes outlined in this section, be sure to review the
  104. :doc:`deprecation timeline </internals/deprecation>` for any features that
  105. have been removed. If you haven't updated your code within the
  106. deprecation timeline for a given feature, its removal may appear as a
  107. backwards incompatible change.
  108. ...
  109. Miscellaneous
  110. ~~~~~~~~~~~~~
  111. * ...
  112. .. _deprecated-features-1.9:
  113. Features deprecated in 1.9
  114. ==========================
  115. ...
  116. .. removed-features-1.9:
  117. Features removed in 1.9
  118. =======================
  119. These features have reached the end of their deprecation cycle and so have been
  120. removed in Django 1.9 (please see the :ref:`deprecation timeline
  121. <deprecation-removed-in-1.9>` for more details):
  122. * ``django.utils.dictconfig`` is removed.
  123. * ``django.utils.importlib`` is removed.
  124. * ``django.utils.tzinfo`` is removed.
  125. * ``django.utils.unittest`` is removed.
  126. * The ``syncdb`` command is removed.
  127. * ``django.db.models.signals.pre_syncdb`` and
  128. ``django.db.models.signals.post_syncdb`` is removed.
  129. * Support for ``allow_syncdb`` on database routers is removed.
  130. * The legacy method of syncing apps without migrations is removed,
  131. and migrations are compulsory for all apps. This includes automatic
  132. loading of ``initial_data`` fixtures and support for initial SQL data.
  133. * All models need to be defined inside an installed application or declare an
  134. explicit :attr:`~django.db.models.Options.app_label`. Furthermore, it isn't
  135. possible to import them before their application is loaded. In particular, it
  136. isn't possible to import models inside the root package of an application.
  137. * The model and form ``IPAddressField`` is removed. A stub field remains for
  138. compatibility with historical migrations.
  139. * ``AppCommand.handle_app()`` is no longer be supported.
  140. * ``RequestSite`` is located in ``django.contrib.sites.requests`` and
  141. ``get_current_site`` in ``django.contrib.sites.shortcuts``.
  142. * FastCGI support via the ``runfcgi`` management command is removed.
  143. * ``django.utils.datastructures.SortedDict`` is removed.
  144. * ``ModelAdmin.declared_fieldsets`` is removed.
  145. * Instances of ``util.py`` in the Django codebase have been renamed to
  146. ``utils.py`` in an effort to unify all util and utils references.
  147. The modules that provided backwards compatibility are removed:
  148. * ``django.contrib.admin.util``
  149. * ``django.contrib.gis.db.backends.util``
  150. * ``django.db.backends.util``
  151. * ``django.forms.util``
  152. * ``ModelAdmin.get_formsets`` is removed.
  153. * The backward compatible shims introduced to rename the
  154. ``BaseMemcachedCache._get_memcache_timeout()`` method to
  155. ``get_backend_timeout()`` is removed.
  156. * The ``--natural`` and ``-n`` options for :djadmin:`dumpdata` are removed.
  157. * The ``use_natural_keys`` argument for ``serializers.serialize()`` is removed.
  158. * ``django.forms.get_declared_fields`` is removed.
  159. * The ability to use a ``SplitDateTimeWidget`` with ``DateTimeField`` is
  160. removed.
  161. * The ``WSGIRequest.REQUEST`` property is removed.
  162. * The class ``django.utils.datastructures.MergeDict`` is removed.
  163. * The ``zh-cn`` and ``zh-tw`` language codes are removed.
  164. * The internal ``django.utils.functional.memoize()`` is removed.
  165. * ``django.core.cache.get_cache`` is removed.
  166. * ``django.db.models.loading`` is removed.
  167. * Passing callable arguments to querysets is no longer possible.
  168. * ``BaseCommand.requires_model_validation`` is removed in favor of
  169. ``requires_system_checks``. Admin validators is replaced by admin checks.
  170. * ``ModelAdmin.validator`` is removed in favor of the new ``checks``
  171. attribute.
  172. * ``django.db.backends.DatabaseValidation.validate_field`` is removed in
  173. favor of the ``check_field`` method.
  174. * ``django.utils.module_loading.import_by_path`` is removed in favor of
  175. ``django.utils.module_loading.import_string``.
  176. * ``ssi`` and ``url`` template tags are removed from the ``future`` template
  177. tag library.
  178. * ``django.utils.text.javascript_quote()`` is removed.
  179. * Database test settings as independent entries in the database settings,
  180. prefixed by ``TEST_``, are no longer supported.
  181. * The `cache_choices` option to :class:`~django.forms.ModelChoiceField` and
  182. :class:`~django.forms.ModelMultipleChoiceField` is removed.
  183. * The default value of the
  184. :attr:`RedirectView.permanent <django.views.generic.base.RedirectView.permanent>`
  185. attribute has changed from ``True`` to ``False``.
  186. * ``django.contrib.sitemaps.FlatPageSitemap`` is removed in favor of
  187. ``django.contrib.flatpages.sitemaps.FlatPageSitemap``.