~ubuntu-branches/ubuntu/quantal/python-django/quantal

« back to all changes in this revision

Viewing changes to docs/releases/1.1-alpha-1.txt

  • Committer: Bazaar Package Importer
  • Author(s): Chris Lamb
  • Date: 2009-07-29 11:26:28 UTC
  • mfrom: (1.1.8 upstream) (4.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20090729112628-pg09ino8sz0sj21t
Tags: 1.1-1
* New upstream release.
* Merge from experimental:
  - Ship FastCGI initscript and /etc/default file in python-django's examples
    directory (Closes: #538863)
  - Drop "05_10539-sphinx06-compatibility.diff"; it has been applied
    upstream.
  - Bump Standards-Version to 3.8.2.

Show diffs side-by-side

added added

removed removed

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