PageRenderTime 15ms CodeModel.GetById 10ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/docs/releases/1.1-alpha-1.txt

https://code.google.com/p/mango-py/
Plain Text | 163 lines | 120 code | 43 blank | 0 comment | 0 complexity | ca6ab91fbcb631a5f65ad15c0184a4ec MD5 | raw file
  1================================
  2Django 1.1 alpha 1 release notes
  3================================
  4
  5February 23, 2009
  6
  7Welcome to Django 1.1 alpha 1!
  8
  9This is the first in a series of preview/development releases leading up to the
 10eventual release of Django 1.1, currently scheduled to take place in April 2009.
 11This release is primarily targeted at developers who are interested in trying
 12out new features and testing the Django codebase to help identify and resolve
 13bugs prior to the final 1.1 release.
 14
 15As such, this release is *not* intended for production use, and any such use is
 16discouraged.
 17
 18What's new in Django 1.1 alpha 1
 19================================
 20
 21ORM improvements
 22----------------
 23
 24Two major enhancements have been added to Django's object-relational mapper
 25(ORM):
 26
 27Aggregate support
 28~~~~~~~~~~~~~~~~~
 29
 30.. currentmodule:: django.db.models
 31
 32It's now possible to run SQL aggregate queries (i.e. ``COUNT()``, ``MAX()``,
 33``MIN()``, etc.) from within Django's ORM. You can choose to either return the
 34results of the aggregate directly, or else annotate the objects in a
 35:class:`QuerySet` with the results of the aggregate query.
 36
 37This feature is available as new :meth:`QuerySet.aggregate()`` and
 38:meth:`QuerySet.annotate()`` methods, and is covered in detail in :doc:`the ORM
 39aggregation documentation </topics/db/aggregation>`
 40
 41Query expressions
 42~~~~~~~~~~~~~~~~~
 43
 44Queries can now refer to a another field on the query and can traverse
 45relationships to refer to fields on related models. This is implemented in the
 46new :class:`F` object; for full details, including examples, consult the
 47:ref:`documentation for F expressions <query-expressions>`.
 48
 49Performance improvements
 50------------------------
 51
 52.. currentmodule:: django.test
 53
 54Tests written using Django's :doc:`testing framework </topics/testing>` now run
 55dramatically faster (as much as 10 times faster in many cases).
 56
 57This was accomplished through the introduction of transaction-based tests: when
 58using :class:`django.test.TestCase`, your tests will now be run in a transaction
 59which is rolled back when finished, instead of by flushing and re-populating the
 60database. This results in an immense speedup for most types of unit tests. See
 61the documentation for :class:`TestCase` and :class:`TransactionTestCase` for a
 62full description, and some important notes on database support.
 63
 64Other improvements
 65------------------
 66
 67Other new features and changes introduced since Django 1.0 include:
 68
 69* The :doc:`CSRF protection middleware </ref/contrib/csrf>` has been split into
 70  two classes -- ``CsrfViewMiddleware`` checks incoming requests, and
 71  ``CsrfResponseMiddleware`` processes outgoing responses. The combined
 72  ``CsrfMiddleware`` class (which does both) remains for
 73  backwards-compatibility, but using the split classes is now recommended in
 74  order to allow fine-grained control of when and where the CSRF processing
 75  takes place.
 76
 77* :func:`~django.core.urlresolvers.reverse` and code which uses it (e.g., the
 78  ``{% url %}`` template tag) now works with URLs in Django's administrative
 79  site, provided that the admin URLs are set up via ``include(admin.site.urls)``
 80  (sending admin requests to the ``admin.site.root`` view still works, but URLs
 81  in the admin will not be "reversible" when configured this way).
 82
 83* The ``include()`` function in Django URLconf modules can now accept sequences
 84  of URL patterns (generated by ``patterns()``) in addition to module names.
 85
 86* Instances of Django forms (see :doc:`the forms overview </topics/forms/index>`)
 87  now have two additional methods, ``hidden_fields()`` and ``visible_fields()``,
 88  which return the list of hidden -- i.e., ``<input type="hidden">`` -- and
 89  visible fields on the form, respectively.
 90
 91* The ``redirect_to`` generic view (see :doc:`the generic views documentation
 92  </ref/generic-views>`) now accepts an additional keyword argument
 93  ``permanent``. If ``permanent`` is ``True``, the view will emit an HTTP
 94  permanent redirect (status code 301). If ``False``, the view will emit an HTTP
 95  temporary redirect (status code 302).
 96
 97* A new database lookup type -- ``week_day`` -- has been added for ``DateField``
 98  and ``DateTimeField``. This type of lookup accepts a number between 1 (Sunday)
 99  and 7 (Saturday), and returns objects where the field value matches that day
100  of the week. See :ref:`the full list of lookup types <field-lookups>` for
101  details.
102
103* The ``{% for %}`` tag in Django's template language now accepts an optional
104  ``{% empty %}`` clause, to be displayed when ``{% for %}`` is asked to loop
105  over an empty sequence. See :doc:`the list of built-in template tags
106  </ref/templates/builtins>` for examples of this.
107
108The Django 1.1 roadmap
109======================
110
111Before Django 1.1 goes final, several other preview/development releases will be
112made available. The current schedule consists of at least the following:
113
114* Week of *March 20, 2009:* Django 1.1 beta 1, at which point Django 1.1 will
115  be in "feature freeze": no new features will be implemented for 1.1
116  past that point, and all new feature work will be deferred to
117  Django 1.2.
118
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
123* Week of *April 13, 2009:* Django 1.1 final.
124
125If deemed necessary, additional alpha, beta or release candidate packages will
126be issued prior to the final 1.1 release.
127
128What you can do to help
129=======================
130
131In order to provide a high-quality 1.1 release, we need your help. Although this
132alpha release is, again, *not* intended for production use, you can help the
133Django team by trying out the alpha codebase in a safe test environment and
134reporting any bugs or issues you encounter. The Django ticket tracker is the
135central place to search for open issues:
136
137    * http://code.djangoproject.com/timeline
138
139Please open new tickets if no existing ticket corresponds to a problem you're
140running into.
141
142Additionally, discussion of Django development, including progress toward the
1431.1 release, takes place daily on the django-developers mailing list:
144
145    * http://groups.google.com/group/django-developers
146
147... and in the ``#django-dev`` IRC channel on ``irc.freenode.net``. If you're
148interested in helping out with Django's development, feel free to join the
149discussions there.
150
151Django's online documentation also includes pointers on how to contribute to
152Django:
153
154    * :doc:`How to contribute to Django </internals/contributing>`
155
156Contributions on any level -- developing code, writing documentation or simply
157triaging tickets and helping to test proposed bugfixes -- are always welcome and
158appreciated.
159
160Development sprints for Django 1.1 will also be taking place at PyCon US 2009,
161on the dedicated sprint days (March 30 through April 2), and anyone who wants to
162help out is welcome to join in, either in person at PyCon or virtually in the
163IRC channel or on the mailing list.