1.7.txt 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. ============================================
  2. Django 1.7 release notes - UNDER DEVELOPMENT
  3. ============================================
  4. Welcome to Django 1.7!
  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.6 or older versions. We've also dropped some features, which are detailed in
  8. :doc:`our deprecation plan </internals/deprecation>`, and we've `begun the
  9. deprecation process for some features`_.
  10. .. _`new features`: `What's new in Django 1.7`_
  11. .. _`backwards incompatible changes`: `Backwards incompatible changes in 1.7`_
  12. .. _`begun the deprecation process for some features`: `Features deprecated in 1.7`_
  13. Python compatibility
  14. ====================
  15. Django 1.7 requires Python 2.7 or above, though we **highly recommend**
  16. the latest minor release. Support for Python 2.6 has been dropped.
  17. This change should affect only a small number of Django users, as most
  18. operating-system vendors today are shipping Python 2.7 or newer as their default
  19. version. If you're still using Python 2.6, however, you'll need to stick to
  20. Django 1.6 until you can upgrade your Python version. Per :doc:`our support
  21. policy </internals/release-process>`, Django 1.6 will continue to receive
  22. security support until the release of Django 1.8.
  23. What's new in Django 1.7
  24. ========================
  25. Admin shortcuts support time zones
  26. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  27. The "today" and "now" shortcuts next to date and time input widgets in the
  28. admin are now operating in the :ref:`current time zone
  29. <default-current-time-zone>`. Previously, they used the browser time zone,
  30. which could result in saving the wrong value when it didn't match the current
  31. time zone on the server.
  32. In addition, the widgets now display a help message when the browser and
  33. server time zone are different, to clarify how the value inserted in the field
  34. will be interpreted.
  35. Minor features
  36. ~~~~~~~~~~~~~~
  37. * The new :attr:`UploadedFile.content_type_extra
  38. <django.core.files.uploadedfile.UploadedFile.content_type_extra>` attribute
  39. contains extra parameters passed to the ``content-type`` header on a file
  40. upload.
  41. * The ``enter`` argument was added to the
  42. :data:`~django.test.signals.setting_changed` signal.
  43. * The :meth:`QuerySet.update_or_create()
  44. <django.db.models.query.QuerySet.update_or_create>` method was added.
  45. Backwards incompatible changes in 1.7
  46. =====================================
  47. .. warning::
  48. In addition to the changes outlined in this section, be sure to review the
  49. :doc:`deprecation plan </internals/deprecation>` for any features that
  50. have been removed. If you haven't updated your code within the
  51. deprecation timeline for a given feature, its removal may appear as a
  52. backwards incompatible change.
  53. Miscellaneous
  54. ~~~~~~~~~~~~~
  55. * The :meth:`django.core.files.uploadhandler.FileUploadHandler.new_file()`
  56. method is now passed an additional ``content_type_extra`` parameter. If you
  57. have a custom :class:`~django.core.files.uploadhandler.FileUploadHandler`
  58. that implements ``new_file()``, be sure it accepts this new parameter.
  59. Features deprecated in 1.7
  60. ==========================
  61. ``django.utils.dictconfig``
  62. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  63. ``django.utils.dictconfig`` was a copy of :mod:`logging.config` provided for
  64. Python versions prior to 2.7. It has been deprecated.
  65. ``django.utils.unittest``
  66. ~~~~~~~~~~~~~~~~~~~~~~~~~
  67. ``django.utils.unittest`` provided uniform access to the ``unittest2`` library
  68. on all Python versions. Since ``unittest2`` became the standard library's
  69. :mod:`unittest` module in Python 2.7, and Django 1.7 drops support for older
  70. Python versions, this module isn't useful anymore. It has been deprecated. Use
  71. :mod:`unittest` instead.