1.10.txt 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688
  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. * For sites running on a subpath, the default :attr:`URL for the "View site"
  26. link <django.contrib.admin.AdminSite.site_url>` at the top of each admin page
  27. will now point to ``request.META['SCRIPT_NAME']`` if set, instead of ``/``.
  28. * The success message that appears after adding or editing an object now
  29. contains a link to the object's change form.
  30. * All inline JavaScript is removed so you can enable the
  31. ``Content-Security-Policy`` HTTP header if you wish.
  32. * The new :attr:`InlineModelAdmin.classes
  33. <django.contrib.admin.InlineModelAdmin.classes>` attribute allows specifying
  34. classes on inline fieldsets. Inlines with a ``collapse`` class will be
  35. initially collapsed and their header will have a small "show" link.
  36. * If a user doesn't have the add permission, the ``object-tools`` block on a
  37. model's changelist will now be rendered (without the add button, of course).
  38. This makes it easier to add custom tools in this case.
  39. * The :class:`~django.contrib.admin.models.LogEntry` model now stores change
  40. messages in a JSON structure so that the message can be dynamically translated
  41. using the current active language. A new ``LogEntry.get_change_message()``
  42. method is now the preferred way of retrieving the change message.
  43. :mod:`django.contrib.admindocs`
  44. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  45. * ...
  46. :mod:`django.contrib.auth`
  47. ^^^^^^^^^^^^^^^^^^^^^^^^^^
  48. * The default iteration count for the PBKDF2 password hasher has been increased
  49. by 25%. This backwards compatible change will not affect users who have
  50. subclassed ``django.contrib.auth.hashers.PBKDF2PasswordHasher`` to change the
  51. default value.
  52. * The :func:`~django.contrib.auth.views.logout` view sends "no-cache" headers
  53. to prevent an issue where Safari caches redirects and prevents a user from
  54. being able to log out.
  55. * Added the optional ``backend`` argument to :func:`~django.contrib.auth.login`
  56. to allow using it without credentials.
  57. :mod:`django.contrib.contenttypes`
  58. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  59. * ...
  60. :mod:`django.contrib.gis`
  61. ^^^^^^^^^^^^^^^^^^^^^^^^^^
  62. * :ref:`Distance lookups <distance-lookups>` now accept expressions as the
  63. distance value parameter.
  64. * The new :attr:`GEOSGeometry.unary_union
  65. <django.contrib.gis.geos.GEOSGeometry.unary_union>` property computes the
  66. union of all the elements of this geometry.
  67. * Added the :meth:`GEOSGeometry.covers()
  68. <django.contrib.gis.geos.GEOSGeometry.covers>` binary predicate.
  69. * Added the :meth:`GDALBand.statistics()
  70. <django.contrib.gis.gdal.GDALBand.statistics>` method and
  71. :attr:`~django.contrib.gis.gdal.GDALBand.mean`
  72. and :attr:`~django.contrib.gis.gdal.GDALBand.std` attributes.
  73. * Added support for the :class:`~django.contrib.gis.db.models.MakeLine`
  74. aggregate and :class:`~django.contrib.gis.db.models.functions.GeoHash`
  75. function on SpatiaLite.
  76. * Added support for the
  77. :class:`~django.contrib.gis.db.models.functions.Difference`,
  78. :class:`~django.contrib.gis.db.models.functions.Intersection`, and
  79. :class:`~django.contrib.gis.db.models.functions.SymDifference`
  80. functions on MySQL.
  81. * Added support for instantiating empty GEOS geometries.
  82. * The new :attr:`~django.contrib.gis.geos.WKTWriter.trim` and
  83. :attr:`~django.contrib.gis.geos.WKTWriter.precision` properties
  84. of :class:`~django.contrib.gis.geos.WKTWriter` allow controlling
  85. output of the fractional part of the coordinates in WKT.
  86. * Added the :attr:`LineString.closed
  87. <django.contrib.gis.geos.LineString.closed>` and
  88. :attr:`MultiLineString.closed
  89. <django.contrib.gis.geos.MultiLineString.closed>` properties.
  90. :mod:`django.contrib.messages`
  91. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  92. * ...
  93. :mod:`django.contrib.postgres`
  94. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  95. * ...
  96. :mod:`django.contrib.redirects`
  97. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  98. * ...
  99. :mod:`django.contrib.sessions`
  100. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  101. * The :djadmin:`clearsessions` management command now removes file-based
  102. sessions.
  103. :mod:`django.contrib.sitemaps`
  104. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  105. * ...
  106. :mod:`django.contrib.sites`
  107. ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  108. * The :class:`~django.contrib.sites.models.Site` model now supports
  109. :ref:`natural keys <topics-serialization-natural-keys>`.
  110. :mod:`django.contrib.staticfiles`
  111. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  112. * The :ttag:`static` template tag now uses ``django.contrib.staticfiles``
  113. if it's in ``INSTALLED_APPS``. This is especially useful for third-party apps
  114. which can now always use ``{% load static %}`` (instead of
  115. ``{% load staticfiles %}`` or ``{% load static from staticfiles %}``) and
  116. not worry about whether or not the ``staticfiles`` app is installed.
  117. :mod:`django.contrib.syndication`
  118. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  119. * ...
  120. Cache
  121. ^^^^^
  122. * The file-based cache backend now uses the highest pickling protocol.
  123. CSRF
  124. ^^^^
  125. * The default :setting:`CSRF_FAILURE_VIEW`, ``views.csrf.csrf_failure()`` now
  126. accepts an optional ``template_name`` parameter, defaulting to
  127. ``'403_csrf.html'``, to control the template used to render the page.
  128. Database backends
  129. ^^^^^^^^^^^^^^^^^
  130. * ...
  131. Email
  132. ^^^^^
  133. * ...
  134. File Storage
  135. ^^^^^^^^^^^^
  136. * ...
  137. File Uploads
  138. ^^^^^^^^^^^^
  139. * ...
  140. Forms
  141. ^^^^^
  142. * Form and widget ``Media`` is now served using
  143. :mod:`django.contrib.staticfiles` if installed.
  144. Generic Views
  145. ^^^^^^^^^^^^^
  146. * The :class:`~django.views.generic.base.View` class can now be imported from
  147. ``django.views``.
  148. Internationalization
  149. ^^^^^^^^^^^^^^^^^^^^
  150. * ...
  151. Management Commands
  152. ^^^^^^^^^^^^^^^^^^^
  153. * The new :djadminopt:`--fail-level` option of the :djadmin:`check` command
  154. allows specifying the message level that will cause the command to exit with
  155. a non-zero status.
  156. * The new :djadminopt:`makemigrations --check <--check>` option makes the
  157. command exit with a non-zero status when model changes without migrations are
  158. detected.
  159. * :djadmin:`makemigrations` now displays the path to the migration files that
  160. it generates.
  161. * The :djadmin:`shell` ``--interface`` option now accepts ``python`` to force
  162. use of the "plain" Python interpreter.
  163. * The new :djadminopt:`shell --command <--command>` option lets you run a
  164. command as Django and exit, instead of opening the interactive shell.
  165. Migrations
  166. ^^^^^^^^^^
  167. * Added support for serialization of ``enum.Enum`` objects.
  168. Models
  169. ^^^^^^
  170. * Reverse foreign keys from proxy models are now propagated to their
  171. concrete class. The reverse relation attached by a
  172. :class:`~django.db.models.ForeignKey` pointing to a proxy model is now
  173. accessible as a descriptor on the proxied model class and may be referenced in
  174. queryset filtering.
  175. * The new :meth:`Field.rel_db_type() <django.db.models.Field.rel_db_type>`
  176. method returns the database column data type for fields such as ``ForeignKey``
  177. and ``OneToOneField`` that point to another field.
  178. * The :attr:`~django.db.models.Func.arity` class attribute is added to
  179. :class:`~django.db.models.Func`. This attribute can be used to set the number
  180. of arguments the function accepts.
  181. * Added :class:`~django.db.models.BigAutoField` which acts much like an
  182. :class:`~django.db.models.AutoField` except that it is guaranteed
  183. to fit numbers from ``1`` to ``9223372036854775807``.
  184. * :meth:`QuerySet.in_bulk() <django.db.models.query.QuerySet.in_bulk>`
  185. may be called without any arguments to return all objects in the queryset.
  186. Requests and Responses
  187. ^^^^^^^^^^^^^^^^^^^^^^
  188. * Added ``request.user`` to the debug view.
  189. * Added :class:`~django.http.HttpResponse` methods
  190. :meth:`~django.http.HttpResponse.readable()` and
  191. :meth:`~django.http.HttpResponse.seekable()` to make an instance a
  192. stream-like object and allow wrapping it with :py:class:`io.TextIOWrapper`.
  193. Serialization
  194. ^^^^^^^^^^^^^
  195. * The ``django.core.serializers.json.DjangoJSONEncoder`` now knows how to
  196. serialize lazy strings, typically used for translatable content.
  197. Signals
  198. ^^^^^^^
  199. * ...
  200. Templates
  201. ^^^^^^^^^
  202. * Added the ``autoescape`` option to the
  203. :class:`~django.template.backends.django.DjangoTemplates` backend and the
  204. :class:`~django.template.Engine` class.
  205. Tests
  206. ^^^^^
  207. * ...
  208. URLs
  209. ^^^^
  210. * An addition in :func:`django.setup()` allows URL resolving that happens
  211. outside of the request/response cycle (e.g. in management commands and
  212. standalone scripts) to take :setting:`FORCE_SCRIPT_NAME` into account when it
  213. is set.
  214. Validators
  215. ^^^^^^^^^^
  216. * :class:`~django.core.validators.URLValidator` now limits the length of
  217. domain name labels to 63 characters and the total length of domain
  218. names to 253 characters per :rfc:`1034`.
  219. Backwards incompatible changes in 1.10
  220. ======================================
  221. .. warning::
  222. In addition to the changes outlined in this section, be sure to review the
  223. :ref:`removed-features-1.10` for the features that have reached the end of
  224. their deprecation cycle and therefore been removed. If you haven't updated
  225. your code within the deprecation timeline for a given feature, its removal
  226. may appear as a backwards incompatible change.
  227. Database backend API
  228. ~~~~~~~~~~~~~~~~~~~~
  229. * ...
  230. ``select_related()`` prohibits non-relational fields for nested relations
  231. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  232. Django 1.8 added validation for non-relational fields in ``select_related()``::
  233. >>> Book.objects.select_related('title')
  234. Traceback (most recent call last):
  235. ...
  236. FieldError: Non-relational field given in select_related: 'title'
  237. But it didn't prohibit nested non-relation fields as it does now::
  238. >>> Book.objects.select_related('author__name')
  239. Traceback (most recent call last):
  240. ...
  241. FieldError: Non-relational field given in select_related: 'name'
  242. ``_meta.get_fields()`` returns consistent reverse fields for proxy models
  243. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  244. Before Django 1.10, the :meth:`~django.db.models.options.Options.get_fields`
  245. method returned different reverse fields when called on a proxy model compared
  246. to its proxied concrete class. This inconsistency was fixed by returning the
  247. full set of fields pointing to a concrete class or one of its proxies in both
  248. cases.
  249. :attr:`AbstractUser.username <django.contrib.auth.models.User.username>` ``max_length`` increased to 150
  250. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  251. A migration for :attr:`django.contrib.auth.models.User.username` is included.
  252. If you have a custom user model inheriting from ``AbstractUser``, you'll need
  253. to generate and apply a database migration for your user model.
  254. We considered an increase to 254 characters to more easily allow the use of
  255. email addresses (which are limited to 254 characters) as usernames but rejected
  256. it due to a MySQL limitation. When using the ``utf8mb4`` encoding (recommended
  257. for proper Unicode support), MySQL can only create unique indexes with 191
  258. characters by default. Therefore, if you need a longer length, please use a
  259. custom user model.
  260. If you want to preserve the 30 character limit for usernames, use a custom form
  261. when creating a user or changing usernames::
  262. from django.contrib.auth.forms import UserCreationForm
  263. class MyUserCreationForm(UserCreationForm):
  264. username = forms.CharField(
  265. max_length=30,
  266. help_text='Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only.',
  267. )
  268. If you wish to keep this restriction in the admin, set ``UserAdmin.add_form``
  269. to use this form::
  270. from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
  271. from django.contrib.auth.models import User
  272. class UserAdmin(BaseUserAdmin):
  273. add_form = MyUserCreationForm
  274. admin.site.unregister(User)
  275. admin.site.register(User, UserAdmin)
  276. Dropped support for PostgreSQL 9.1
  277. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  278. Upstream support for PostgreSQL 9.1 ends in September 2016. As a consequence,
  279. Django 1.10 sets PostgreSQL 9.2 as the minimum version it officially supports.
  280. ``runserver`` output goes through logging
  281. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  282. Request and response handling of the ``runserver`` command is sent to the
  283. :ref:`django-server-logger` logger instead of to ``sys.stderr``. If you
  284. disable Django's logging configuration or override it with your own, you'll
  285. need to add the appropriate logging configuration if you want to see that
  286. output::
  287. 'formatters': {
  288. 'django.server': {
  289. '()': 'django.utils.log.ServerFormatter',
  290. 'format': '[%(server_time)s] %(message)s',
  291. }
  292. },
  293. 'handlers': {
  294. 'django.server': {
  295. 'level': 'INFO',
  296. 'class': 'logging.StreamHandler',
  297. 'formatter': 'django.server',
  298. },
  299. },
  300. 'loggers': {
  301. 'django.server': {
  302. 'handlers': ['django.server'],
  303. 'level': 'INFO',
  304. 'propagate': False,
  305. }
  306. }
  307. Miscellaneous
  308. ~~~~~~~~~~~~~
  309. * The ``repr()`` of a ``QuerySet`` is wrapped in ``<QuerySet >`` to
  310. disambiguate it from a plain list when debugging.
  311. * Support for SpatiaLite < 3.0 and GEOS < 3.3 is dropped.
  312. * ``utils.version.get_version()`` returns :pep:`440` compliant release
  313. candidate versions (e.g. '1.10rc1' instead of '1.10c1').
  314. * The ``LOGOUT_URL`` setting is removed as Django hasn't made use of it
  315. since pre-1.0. If you use it in your project, you can add it to your
  316. project's settings. The default value was ``'/accounts/logout/'``.
  317. * The ``add_postgis_srs()`` backwards compatibility alias for
  318. ``django.contrib.gis.utils.add_srs_entry()`` is removed.
  319. * Objects with a ``close()`` method such as files and generators passed to
  320. :class:`~django.http.HttpResponse` are now closed immediately instead of when
  321. the WSGI server calls ``close()`` on the response.
  322. * A redundant ``transaction.atomic()`` call in ``QuerySet.update_or_create()``
  323. is removed. This may affect query counts tested by
  324. ``TransactionTestCase.assertNumQueries()``.
  325. * Support for ``skip_validation`` in ``BaseCommand.execute(**options)`` is
  326. removed. Use ``skip_checks`` (added in Django 1.7) instead.
  327. * :djadmin:`loaddata` now raises a ``CommandError`` instead of showing a
  328. warning when the specified fixture file is not found.
  329. * Instead of directly accessing the ``LogEntry.change_message`` attribute, it's
  330. now better to call the ``LogEntry.get_change_message()`` method which will
  331. provide the message in the current language.
  332. .. _deprecated-features-1.10:
  333. Features deprecated in 1.10
  334. ===========================
  335. Direct assignment to a reverse foreign key or many-to-many relation
  336. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  337. Instead of assigning related objects using direct assignment::
  338. >>> new_list = [obj1, obj2, obj3]
  339. >>> e.related_set = new_list
  340. Use the :meth:`~django.db.models.fields.related.RelatedManager.set` method
  341. added in Django 1.9::
  342. >>> e.related_set.set([obj1, obj2, obj3])
  343. This prevents confusion about an assignment resulting in an implicit save.
  344. :mod:`django.contrib.gis`
  345. ~~~~~~~~~~~~~~~~~~~~~~~~~
  346. * The ``get_srid()`` and ``set_srid()`` methods of
  347. :class:`~django.contrib.gis.geos.GEOSGeometry` are deprecated in favor
  348. of the :attr:`~django.contrib.gis.geos.GEOSGeometry.srid` property.
  349. * The ``get_x()``, ``set_x()``, ``get_y()``, ``set_y()``, ``get_z()``, and
  350. ``set_z()`` methods of :class:`~django.contrib.gis.geos.Point` are deprecated
  351. in favor of the ``x``, ``y``, and ``z`` properties.
  352. * The ``get_coords()`` and ``set_coords()`` methods of
  353. :class:`~django.contrib.gis.geos.Point` are deprecated in favor of the
  354. ``tuple`` property.
  355. * The ``cascaded_union`` property of
  356. :class:`~django.contrib.gis.geos.MultiPolygon` is deprecated in favor of the
  357. :attr:`~django.contrib.gis.geos.GEOSGeometry.unary_union` property.
  358. Miscellaneous
  359. ~~~~~~~~~~~~~
  360. * The ``makemigrations --exit`` option is deprecated in favor of the
  361. :djadminopt:`--check` option.
  362. * ``django.utils.functional.allow_lazy()`` is deprecated in favor of the new
  363. :func:`~django.utils.functional.keep_lazy` function which can be used with a
  364. more natural decorator syntax.
  365. * The ``shell --plain`` option is deprecated in favor of ``-i python`` or
  366. ``--interface python``.
  367. * Importing from the ``django.core.urlresolvers`` module is deprecated in
  368. favor of its new location, :mod:`django.urls`.
  369. .. _removed-features-1.10:
  370. Features removed in 1.10
  371. ========================
  372. These features have reached the end of their deprecation cycle and so have been
  373. removed in Django 1.10 (please see the :ref:`deprecation timeline
  374. <deprecation-removed-in-1.10>` for more details):
  375. * Support for calling a ``SQLCompiler`` directly as an alias for calling its
  376. ``quote_name_unless_alias`` method is removed.
  377. * The ``cycle`` and ``firstof`` template tags are removed from the ``future``
  378. template tag library.
  379. * ``django.conf.urls.patterns()`` is removed.
  380. * Support for the ``prefix`` argument to
  381. ``django.conf.urls.i18n.i18n_patterns()`` is removed.
  382. * ``SimpleTestCase.urls`` is removed.
  383. * Using an incorrect count of unpacked values in the ``for`` template tag
  384. raises an exception rather than failing silently.
  385. * The ability to :func:`~django.urls.reverse` URLs using a dotted Python path
  386. is removed.
  387. * Support for ``optparse`` is dropped for custom management commands.
  388. * The class ``django.core.management.NoArgsCommand`` is removed.
  389. * ``django.core.context_processors`` module is removed.
  390. * ``django.db.models.sql.aggregates`` module is removed.
  391. * ``django.contrib.gis.db.models.sql.aggregates`` module is removed.
  392. * The following methods and properties of ``django.db.sql.query.Query`` are
  393. removed:
  394. * Properties: ``aggregates`` and ``aggregate_select``
  395. * Methods: ``add_aggregate``, ``set_aggregate_mask``, and
  396. ``append_aggregate_mask``.
  397. * ``django.template.resolve_variable`` is removed.
  398. * The following private APIs are removed from
  399. :class:`django.db.models.options.Options` (``Model._meta``):
  400. * ``get_field_by_name()``
  401. * ``get_all_field_names()``
  402. * ``get_fields_with_model()``
  403. * ``get_concrete_fields_with_model()``
  404. * ``get_m2m_with_model()``
  405. * ``get_all_related_objects()``
  406. * ``get_all_related_objects_with_model()``
  407. * ``get_all_related_many_to_many_objects()``
  408. * ``get_all_related_m2m_objects_with_model()``
  409. * The ``error_message`` argument of ``django.forms.RegexField`` is removed.
  410. * The ``unordered_list`` filter no longer supports old style lists.
  411. * Support for string ``view`` arguments to ``url()`` is removed.
  412. * The backward compatible shim to rename ``django.forms.Form._has_changed()``
  413. to ``has_changed()`` is removed.
  414. * The ``removetags`` template filter is removed.
  415. * The ``remove_tags()`` and ``strip_entities()`` functions in
  416. ``django.utils.html`` is removed.
  417. * The ``is_admin_site`` argument to
  418. ``django.contrib.auth.views.password_reset()`` is removed.
  419. * ``django.db.models.field.subclassing.SubfieldBase`` is removed.
  420. * ``django.utils.checksums`` is removed.
  421. * The ``original_content_type_id`` attribute on
  422. ``django.contrib.admin.helpers.InlineAdminForm`` is removed.
  423. * The backwards compatibility shim to allow ``FormMixin.get_form()`` to be
  424. defined with no default value for its ``form_class`` argument is removed.
  425. * The following settings are removed:
  426. * ``ALLOWED_INCLUDE_ROOTS``
  427. * ``TEMPLATE_CONTEXT_PROCESSORS``
  428. * ``TEMPLATE_DEBUG``
  429. * ``TEMPLATE_DIRS``
  430. * ``TEMPLATE_LOADERS``
  431. * ``TEMPLATE_STRING_IF_INVALID``
  432. * The backwards compatibility alias ``django.template.loader.BaseLoader`` is
  433. removed.
  434. * Django template objects returned by
  435. :func:`~django.template.loader.get_template` and
  436. :func:`~django.template.loader.select_template` no longer accept a
  437. :class:`~django.template.Context` in their
  438. :meth:`~django.template.backends.base.Template.render()` method.
  439. * :doc:`Template response APIs </ref/template-response>` enforce the use of
  440. :class:`dict` and backend-dependent template objects instead of
  441. :class:`~django.template.Context` and :class:`~django.template.Template`
  442. respectively.
  443. * The ``current_app`` parameter for the following function and classes is
  444. removed:
  445. * ``django.shortcuts.render()``
  446. * ``django.template.Context()``
  447. * ``django.template.RequestContext()``
  448. * ``django.template.response.TemplateResponse()``
  449. * The ``dictionary`` and ``context_instance`` parameters for the following
  450. functions are removed:
  451. * ``django.shortcuts.render()``
  452. * ``django.shortcuts.render_to_response()``
  453. * ``django.template.loader.render_to_string()``
  454. * The ``dirs`` parameter for the following functions is removed:
  455. * ``django.template.loader.get_template()``
  456. * ``django.template.loader.select_template()``
  457. * ``django.shortcuts.render()``
  458. * ``django.shortcuts.render_to_response()``
  459. * Session verification is enabled regardless of whether or not
  460. ``'django.contrib.auth.middleware.SessionAuthenticationMiddleware'`` is in
  461. ``MIDDLEWARE_CLASSES``. ``SessionAuthenticationMiddleware`` no longer has
  462. any purpose and can be removed from ``MIDDLEWARE_CLASSES``. It's kept as
  463. a stub until Django 2.0 as a courtesy for users who don't read this note.
  464. * Private attribute ``django.db.models.Field.related`` is removed.
  465. * The ``--list`` option of the ``migrate`` management command is removed.
  466. * The ``ssi`` template tag is removed.
  467. * Support for the ``=`` comparison operator in the ``if`` template tag is
  468. removed.
  469. * The backwards compatibility shims to allow ``Storage.get_available_name()``
  470. and ``Storage.save()`` to be defined without a ``max_length`` argument are
  471. removed.
  472. * Support for the legacy ``%(<foo>)s`` syntax in ``ModelFormMixin.success_url``
  473. is removed.
  474. * ``GeoQuerySet`` aggregate methods ``collect()``, ``extent()``, ``extent3d()``,
  475. ``make_line()``, and ``unionagg()`` are removed.
  476. * The ability to specify ``ContentType.name`` when creating a content type
  477. instance is removed.
  478. * Support for the old signature of ``allow_migrate`` is removed.
  479. * Support for the syntax of ``{% cycle %}`` that uses comma-separated arguments
  480. is removed.
  481. * The warning that :class:`~django.core.signing.Signer` issued when given an
  482. invalid separator is now a ``ValueError``.