<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Django 1.1 alpha 1 release notes — Django 1.4.13 documentation</title> <link rel="stylesheet" href="../_static/default.css" type="text/css" /> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', VERSION: '1.4.13', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="../_static/jquery.js"></script> <script type="text/javascript" src="../_static/underscore.js"></script> <script type="text/javascript" src="../_static/doctools.js"></script> <link rel="top" title="Django 1.4.13 documentation" href="../index.html" /> <link rel="up" title="Release notes" href="index.html" /> <link rel="next" title="Django 1.0 beta 2 release notes" href="1.0-beta-2.html" /> <link rel="prev" title="Django 1.1 beta 1 release notes" href="1.1-beta-1.html" /> <script type="text/javascript" src="../templatebuiltins.js"></script> <script type="text/javascript"> (function($) { if (!django_template_builtins) { // templatebuiltins.js missing, do nothing. return; } $(document).ready(function() { // Hyperlink Django template tags and filters var base = "../ref/templates/builtins.html"; if (base == "#") { // Special case for builtins.html itself base = ""; } // Tags are keywords, class '.k' $("div.highlight\\-html\\+django span.k").each(function(i, elem) { var tagname = $(elem).text(); if ($.inArray(tagname, django_template_builtins.ttags) != -1) { var fragment = tagname.replace(/_/, '-'); $(elem).html("<a href='" + base + "#" + fragment + "'>" + tagname + "</a>"); } }); // Filters are functions, class '.nf' $("div.highlight\\-html\\+django span.nf").each(function(i, elem) { var filtername = $(elem).text(); if ($.inArray(filtername, django_template_builtins.tfilters) != -1) { var fragment = filtername.replace(/_/, '-'); $(elem).html("<a href='" + base + "#" + fragment + "'>" + filtername + "</a>"); } }); }); })(jQuery); </script> </head> <body> <div class="document"> <div id="custom-doc" class="yui-t6"> <div id="hd"> <h1><a href="../index.html">Django 1.4.13 documentation</a></h1> <div id="global-nav"> <a title="Home page" href="../index.html">Home</a> | <a title="Table of contents" href="../contents.html">Table of contents</a> | <a title="Global index" href="../genindex.html">Index</a> | <a title="Module index" href="../py-modindex.html">Modules</a> </div> <div class="nav"> « <a href="1.1-beta-1.html" title="Django 1.1 beta 1 release notes">previous</a> | <a href="index.html" title="Release notes" accesskey="U">up</a> | <a href="1.0-beta-2.html" title="Django 1.0 beta 2 release notes">next</a> »</div> </div> <div id="bd"> <div id="yui-main"> <div class="yui-b"> <div class="yui-g" id="releases-1.1-alpha-1"> <div class="section" id="s-django-1-1-alpha-1-release-notes"> <span id="django-1-1-alpha-1-release-notes"></span><h1>Django 1.1 alpha 1 release notes<a class="headerlink" href="#django-1-1-alpha-1-release-notes" title="Permalink to this headline">¶</a></h1> <p>February 23, 2009</p> <p>Welcome to Django 1.1 alpha 1!</p> <p>This is the first in a series of preview/development releases leading up to the eventual release of Django 1.1, currently scheduled to take place in April 2009. This release is primarily targeted at developers who are interested in trying out new features and testing the Django codebase to help identify and resolve bugs prior to the final 1.1 release.</p> <p>As such, this release is <em>not</em> intended for production use, and any such use is discouraged.</p> <div class="section" id="s-what-s-new-in-django-1-1-alpha-1"> <span id="what-s-new-in-django-1-1-alpha-1"></span><h2>What’s new in Django 1.1 alpha 1<a class="headerlink" href="#what-s-new-in-django-1-1-alpha-1" title="Permalink to this headline">¶</a></h2> <div class="section" id="s-orm-improvements"> <span id="orm-improvements"></span><h3>ORM improvements<a class="headerlink" href="#orm-improvements" title="Permalink to this headline">¶</a></h3> <p>Two major enhancements have been added to Django’s object-relational mapper (ORM):</p> <div class="section" id="s-aggregate-support"> <span id="aggregate-support"></span><h4>Aggregate support<a class="headerlink" href="#aggregate-support" title="Permalink to this headline">¶</a></h4> <p>It’s now possible to run SQL aggregate queries (i.e. <tt class="docutils literal"><span class="pre">COUNT()</span></tt>, <tt class="docutils literal"><span class="pre">MAX()</span></tt>, <tt class="docutils literal"><span class="pre">MIN()</span></tt>, etc.) from within Django’s ORM. You can choose to either return the results of the aggregate directly, or else annotate the objects in a <tt class="xref py py-class docutils literal"><span class="pre">QuerySet</span></tt> with the results of the aggregate query.</p> <p>This feature is available as new <tt class="xref py py-meth docutils literal"><span class="pre">QuerySet.aggregate()`()</span></tt> and <tt class="xref py py-meth docutils literal"><span class="pre">QuerySet.annotate()`()</span></tt> methods, and is covered in detail in <a class="reference internal" href="../topics/db/aggregation.html"><em>the ORM aggregation documentation</em></a></p> </div> <div class="section" id="s-query-expressions"> <span id="query-expressions"></span><h4>Query expressions<a class="headerlink" href="#query-expressions" title="Permalink to this headline">¶</a></h4> <p>Queries can now refer to a another field on the query and can traverse relationships to refer to fields on related models. This is implemented in the new <tt class="xref py py-class docutils literal"><span class="pre">F</span></tt> object; for full details, including examples, consult the <a class="reference internal" href="../topics/db/queries.html#query-expressions"><em>documentation for F expressions</em></a>.</p> </div> </div> <div class="section" id="s-performance-improvements"> <span id="performance-improvements"></span><h3>Performance improvements<a class="headerlink" href="#performance-improvements" title="Permalink to this headline">¶</a></h3> <p>Tests written using Django’s <a class="reference internal" href="../topics/testing.html"><em>testing framework</em></a> now run dramatically faster (as much as 10 times faster in many cases).</p> <p>This was accomplished through the introduction of transaction-based tests: when using <a class="reference internal" href="../topics/testing.html#django.test.TestCase" title="django.test.TestCase"><tt class="xref py py-class docutils literal"><span class="pre">django.test.TestCase</span></tt></a>, your tests will now be run in a transaction which is rolled back when finished, instead of by flushing and re-populating the database. This results in an immense speedup for most types of unit tests. See the documentation for <a class="reference internal" href="../topics/testing.html#django.test.TestCase" title="django.test.TestCase"><tt class="xref py py-class docutils literal"><span class="pre">TestCase</span></tt></a> and <a class="reference internal" href="../topics/testing.html#django.test.TransactionTestCase" title="django.test.TransactionTestCase"><tt class="xref py py-class docutils literal"><span class="pre">TransactionTestCase</span></tt></a> for a full description, and some important notes on database support.</p> </div> <div class="section" id="s-other-improvements"> <span id="other-improvements"></span><h3>Other improvements<a class="headerlink" href="#other-improvements" title="Permalink to this headline">¶</a></h3> <p>Other new features and changes introduced since Django 1.0 include:</p> <ul class="simple"> <li>The <a class="reference internal" href="../ref/contrib/csrf.html"><em>CSRF protection middleware</em></a> has been split into two classes – <tt class="docutils literal"><span class="pre">CsrfViewMiddleware</span></tt> checks incoming requests, and <tt class="docutils literal"><span class="pre">CsrfResponseMiddleware</span></tt> processes outgoing responses. The combined <tt class="docutils literal"><span class="pre">CsrfMiddleware</span></tt> class (which does both) remains for backwards-compatibility, but using the split classes is now recommended in order to allow fine-grained control of when and where the CSRF processing takes place.</li> <li><a class="reference internal" href="../topics/http/urls.html#django.core.urlresolvers.reverse" title="django.core.urlresolvers.reverse"><tt class="xref py py-func docutils literal"><span class="pre">reverse()</span></tt></a> and code which uses it (e.g., the <tt class="docutils literal"><span class="pre">{%</span> <span class="pre">url</span> <span class="pre">%}</span></tt> template tag) now works with URLs in Django’s administrative site, provided that the admin URLs are set up via <tt class="docutils literal"><span class="pre">include(admin.site.urls)</span></tt> (sending admin requests to the <tt class="docutils literal"><span class="pre">admin.site.root</span></tt> view still works, but URLs in the admin will not be “reversible” when configured this way).</li> <li>The <tt class="docutils literal"><span class="pre">include()</span></tt> function in Django URLconf modules can now accept sequences of URL patterns (generated by <tt class="docutils literal"><span class="pre">patterns()</span></tt>) in addition to module names.</li> <li>Instances of Django forms (see <a class="reference internal" href="../topics/forms/index.html"><em>the forms overview</em></a>) now have two additional methods, <tt class="docutils literal"><span class="pre">hidden_fields()</span></tt> and <tt class="docutils literal"><span class="pre">visible_fields()</span></tt>, which return the list of hidden – i.e., <tt class="docutils literal"><span class="pre"><input</span> <span class="pre">type="hidden"></span></tt> – and visible fields on the form, respectively.</li> <li>The <tt class="docutils literal"><span class="pre">redirect_to</span></tt> generic view (see <a class="reference internal" href="../ref/generic-views.html"><em>the generic views documentation</em></a>) now accepts an additional keyword argument <tt class="docutils literal"><span class="pre">permanent</span></tt>. If <tt class="docutils literal"><span class="pre">permanent</span></tt> is <tt class="docutils literal"><span class="pre">True</span></tt>, the view will emit an HTTP permanent redirect (status code 301). If <tt class="docutils literal"><span class="pre">False</span></tt>, the view will emit an HTTP temporary redirect (status code 302).</li> <li>A new database lookup type – <tt class="docutils literal"><span class="pre">week_day</span></tt> – has been added for <tt class="docutils literal"><span class="pre">DateField</span></tt> and <tt class="docutils literal"><span class="pre">DateTimeField</span></tt>. This type of lookup accepts a number between 1 (Sunday) and 7 (Saturday), and returns objects where the field value matches that day of the week. See <a class="reference internal" href="../ref/models/querysets.html#field-lookups"><em>the full list of lookup types</em></a> for details.</li> <li>The <tt class="docutils literal"><span class="pre">{%</span> <span class="pre">for</span> <span class="pre">%}</span></tt> tag in Django’s template language now accepts an optional <tt class="docutils literal"><span class="pre">{%</span> <span class="pre">empty</span> <span class="pre">%}</span></tt> clause, to be displayed when <tt class="docutils literal"><span class="pre">{%</span> <span class="pre">for</span> <span class="pre">%}</span></tt> is asked to loop over an empty sequence. See <a class="reference internal" href="../ref/templates/builtins.html"><em>the list of built-in template tags</em></a> for examples of this.</li> </ul> </div> </div> <div class="section" id="s-the-django-1-1-roadmap"> <span id="the-django-1-1-roadmap"></span><h2>The Django 1.1 roadmap<a class="headerlink" href="#the-django-1-1-roadmap" title="Permalink to this headline">¶</a></h2> <p>Before Django 1.1 goes final, several other preview/development releases will be made available. The current schedule consists of at least the following:</p> <ul class="simple"> <li>Week of <em>March 20, 2009:</em> Django 1.1 beta 1, at which point Django 1.1 will be in “feature freeze”: no new features will be implemented for 1.1 past that point, and all new feature work will be deferred to Django 1.2.</li> <li>Week of <em>April 2, 2009:</em> Django 1.1 release candidate. At this point all strings marked for translation must freeze to allow translations to be submitted in advance of the final release.</li> <li>Week of <em>April 13, 2009:</em> Django 1.1 final.</li> </ul> <p>If deemed necessary, additional alpha, beta or release candidate packages will be issued prior to the final 1.1 release.</p> </div> <div class="section" id="s-what-you-can-do-to-help"> <span id="what-you-can-do-to-help"></span><h2>What you can do to help<a class="headerlink" href="#what-you-can-do-to-help" title="Permalink to this headline">¶</a></h2> <p>In order to provide a high-quality 1.1 release, we need your help. Although this alpha release is, again, <em>not</em> intended for production use, you can help the Django team by trying out the alpha codebase in a safe test environment and reporting any bugs or issues you encounter. The Django ticket tracker is the central place to search for open issues:</p> <ul class="simple"> <li><a class="reference external" href="https://code.djangoproject.com/timeline">https://code.djangoproject.com/timeline</a></li> </ul> <p>Please open new tickets if no existing ticket corresponds to a problem you’re running into.</p> <p>Additionally, discussion of Django development, including progress toward the 1.1 release, takes place daily on the django-developers mailing list:</p> <ul class="simple"> <li><a class="reference external" href="http://groups.google.com/group/django-developers">http://groups.google.com/group/django-developers</a></li> </ul> <p>... and in the <tt class="docutils literal"><span class="pre">#django-dev</span></tt> IRC channel on <tt class="docutils literal"><span class="pre">irc.freenode.net</span></tt>. If you’re interested in helping out with Django’s development, feel free to join the discussions there.</p> <p>Django’s online documentation also includes pointers on how to contribute to Django:</p> <ul class="simple"> <li><a class="reference internal" href="../internals/contributing/index.html"><em>How to contribute to Django</em></a></li> </ul> <p>Contributions on any level – developing code, writing documentation or simply triaging tickets and helping to test proposed bugfixes – are always welcome and appreciated.</p> <p>Development sprints for Django 1.1 will also be taking place at PyCon US 2009, on the dedicated sprint days (March 30 through April 2), and anyone who wants to help out is welcome to join in, either in person at PyCon or virtually in the IRC channel or on the mailing list.</p> </div> </div> </div> </div> </div> <div class="yui-b" id="sidebar"> <div class="sphinxsidebar"> <div class="sphinxsidebarwrapper"> <h3><a href="../contents.html">Table Of Contents</a></h3> <ul> <li><a class="reference internal" href="#">Django 1.1 alpha 1 release notes</a><ul> <li><a class="reference internal" href="#what-s-new-in-django-1-1-alpha-1">What’s new in Django 1.1 alpha 1</a><ul> <li><a class="reference internal" href="#orm-improvements">ORM improvements</a><ul> <li><a class="reference internal" href="#aggregate-support">Aggregate support</a></li> <li><a class="reference internal" href="#query-expressions">Query expressions</a></li> </ul> </li> <li><a class="reference internal" href="#performance-improvements">Performance improvements</a></li> <li><a class="reference internal" href="#other-improvements">Other improvements</a></li> </ul> </li> <li><a class="reference internal" href="#the-django-1-1-roadmap">The Django 1.1 roadmap</a></li> <li><a class="reference internal" href="#what-you-can-do-to-help">What you can do to help</a></li> </ul> </li> </ul> <h3>Browse</h3> <ul> <li>Prev: <a href="1.1-beta-1.html">Django 1.1 beta 1 release notes</a></li> <li>Next: <a href="1.0-beta-2.html">Django 1.0 beta 2 release notes</a></li> </ul> <h3>You are here:</h3> <ul> <li> <a href="../index.html">Django 1.4.13 documentation</a> <ul><li><a href="index.html">Release notes</a> <ul><li>Django 1.1 alpha 1 release notes</li></ul> </li></ul> </li> </ul> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../_sources/releases/1.1-alpha-1.txt" rel="nofollow">Show Source</a></li> </ul> <div id="searchbox" style="display: none"> <h3>Quick search</h3> <form class="search" action="../search.html" method="get"> <input type="text" name="q" /> <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> <p class="searchtip" style="font-size: 90%"> Enter search terms or a module, class or function name. </p> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <h3>Last update:</h3> <p class="topless">May 15, 2014</p> </div> </div> <div id="ft"> <div class="nav"> « <a href="1.1-beta-1.html" title="Django 1.1 beta 1 release notes">previous</a> | <a href="index.html" title="Release notes" accesskey="U">up</a> | <a href="1.0-beta-2.html" title="Django 1.0 beta 2 release notes">next</a> »</div> </div> </div> <div class="clearer"></div> </div> </body> </html>