1.1-beta-1.txt 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. ===============================
  2. Django 1.1 beta 1 release notes
  3. ===============================
  4. March 23, 2009
  5. Welcome to Django 1.1 beta 1!
  6. This is the second in a series of preview/development releases leading up to
  7. the eventual release of Django 1.1, currently scheduled to take place in April
  8. 2009. This release is primarily targeted at developers who are interested in
  9. trying out new features and testing the Django codebase to help identify and
  10. resolve bugs prior to the final 1.1 release.
  11. As such, this release is *not* intended for production use, and any such use
  12. is discouraged.
  13. What's new in Django 1.1 beta 1
  14. ===============================
  15. .. seealso::
  16. The :doc:`1.1 alpha release notes </releases/1.1-alpha-1>`, which has a
  17. list of everything new between Django 1.0 and Django 1.1 alpha.
  18. Model improvements
  19. ------------------
  20. .. currentmodule:: django.db.models
  21. A number of features have been added to Django's model layer:
  22. "Unmanaged" models
  23. ~~~~~~~~~~~~~~~~~~
  24. You can now control whether or not Django creates database tables for a model
  25. using the :attr:`~Options.managed` model option. This defaults to ``True``,
  26. meaning that Django will create the appropriate database tables in
  27. :djadmin:`syncdb` and remove them as part of ``reset`` command. That
  28. is, Django *manages* the database table's lifecycle.
  29. If you set this to ``False``, however, no database table creating or deletion
  30. will be automatically performed for this model. This is useful if the model
  31. represents an existing table or a database view that has been created by some
  32. other means.
  33. For more details, see the documentation for the :attr:`~Options.managed`
  34. option.
  35. Proxy models
  36. ~~~~~~~~~~~~
  37. You can now create :ref:`proxy models <proxy-models>`: subclasses of existing
  38. models that only add Python behavior and aren't represented by a new table.
  39. That is, the new model is a *proxy* for some underlying model, which stores
  40. all the real data.
  41. All the details can be found in the :ref:`proxy models documentation
  42. <proxy-models>`. This feature is similar on the surface to unmanaged models,
  43. so the documentation has an explanation of :ref:`how proxy models differ from
  44. unmanaged models <proxy-vs-unmanaged-models>`.
  45. Deferred fields
  46. ~~~~~~~~~~~~~~~
  47. In some complex situations, your models might contain fields which could
  48. contain a lot of data (for example, large text fields), or require expensive
  49. processing to convert them to Python objects. If you know you don't need those
  50. particular fields, you can now tell Django not to retrieve them from the
  51. database.
  52. You'll do this with the new queryset methods
  53. :meth:`~django.db.models.query.QuerySet.defer` and
  54. :meth:`~django.db.models.query.QuerySet.only`.
  55. New admin features
  56. ------------------
  57. Since 1.1 alpha, a couple of new features have been added to Django's admin
  58. application:
  59. Editable fields on the change list
  60. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  61. You can now make fields editable on the admin list views via the new
  62. :ref:`list_editable <admin-list-editable>` admin option. These fields will show
  63. up as form widgets on the list pages, and can be edited and saved in bulk.
  64. Admin "actions"
  65. ~~~~~~~~~~~~~~~
  66. You can now define :doc:`admin actions </ref/contrib/admin/actions>` that can perform
  67. some action to a group of models in bulk. Users will be able to select objects on
  68. the change list page and then apply these bulk actions to all selected objects.
  69. Django ships with one pre-defined admin action to delete a group of objects in
  70. one fell swoop.
  71. Testing improvements
  72. --------------------
  73. .. currentmodule:: django.test
  74. A couple of small but very useful improvements have been made to the
  75. :doc:`testing framework </topics/testing/index>`:
  76. * The test :class:`Client` now can automatically follow redirects with the
  77. ``follow`` argument to :meth:`Client.get` and :meth:`Client.post`. This
  78. makes testing views that issue redirects simpler.
  79. * It's now easier to get at the template context in the response returned
  80. the test client: you'll simply access the context as
  81. ``request.context[key]``. The old way, which treats ``request.context``
  82. as a list of contexts, one for each rendered template, is still
  83. available if you need it.
  84. Conditional view processing
  85. ---------------------------
  86. Django now has much better support for :doc:`conditional view processing
  87. </topics/conditional-view-processing>` using the standard ``ETag`` and
  88. ``Last-Modified`` HTTP headers. This means you can now easily short-circuit
  89. view processing by testing less-expensive conditions. For many views this can
  90. lead to a serious improvement in speed and reduction in bandwidth.
  91. Other improvements
  92. ------------------
  93. Finally, a grab-bag of other neat features made their way into this beta
  94. release, including:
  95. * The :djadmin:`dumpdata` management command now accepts individual
  96. model names as arguments, allowing you to export the data just from
  97. particular models.
  98. * There's a new :tfilter:`safeseq` template filter which works just like
  99. :tfilter:`safe` for lists, marking each item in the list as safe.
  100. * :doc:`Cache backends </topics/cache>` now support ``incr()`` and
  101. ``decr()`` commands to increment and decrement the value of a cache key.
  102. On cache backends that support atomic increment/decrement -- most
  103. notably, the memcached backend -- these operations will be atomic, and
  104. quite fast.
  105. * Django now can :doc:`easily delegate authentication to the Web server
  106. </howto/auth-remote-user>` via a new authentication backend that supports
  107. the standard ``REMOTE_USER`` environment variable used for this purpose.
  108. * There's a new :func:`django.shortcuts.redirect` function that makes it
  109. easier to issue redirects given an object, a view name, or a URL.
  110. * The ``postgresql_psycopg2`` backend now supports :ref:`native PostgreSQL
  111. autocommit <postgresql-notes>`. This is an advanced, PostgreSQL-specific
  112. feature, that can make certain read-heavy applications a good deal
  113. faster.
  114. The Django 1.1 roadmap
  115. ======================
  116. Before Django 1.1 goes final, at least one other preview/development release
  117. will be made available. The current schedule consists of at least the
  118. following:
  119. * Week of *April 2, 2009:* Django 1.1 release candidate. At this point all
  120. strings marked for translation must freeze to allow translations to
  121. be submitted in advance of the final release.
  122. * Week of *April 13, 2009:* Django 1.1 final.
  123. If deemed necessary, additional beta or release candidate packages will be
  124. issued prior to the final 1.1 release.
  125. What you can do to help
  126. =======================
  127. In order to provide a high-quality 1.1 release, we need your help. Although this
  128. beta release is, again, *not* intended for production use, you can help the
  129. Django team by trying out the beta codebase in a safe test environment and
  130. reporting any bugs or issues you encounter. The Django ticket tracker is the
  131. central place to search for open issues:
  132. * https://code.djangoproject.com/timeline
  133. Please open new tickets if no existing ticket corresponds to a problem you're
  134. running into.
  135. Additionally, discussion of Django development, including progress toward the
  136. 1.1 release, takes place daily on the django-developers mailing list:
  137. * http://groups.google.com/group/django-developers
  138. ... and in the ``#django-dev`` IRC channel on ``irc.freenode.net``. If you're
  139. interested in helping out with Django's development, feel free to join the
  140. discussions there.
  141. Django's online documentation also includes pointers on how to contribute to
  142. Django:
  143. * :doc:`How to contribute to Django </internals/contributing/index>`
  144. Contributions on any level -- developing code, writing documentation or simply
  145. triaging tickets and helping to test proposed bugfixes -- are always welcome and
  146. appreciated.
  147. Development sprints for Django 1.1 will also be taking place at PyCon US 2009,
  148. on the dedicated sprint days (March 30 through April 2), and anyone who wants to
  149. help out is welcome to join in, either in person at PyCon or virtually in the
  150. IRC channel or on the mailing list.