Sophie

Sophie

distrib > Fedora > 20 > i386 > by-pkgid > 422242acff54b9373d7d4b7f73232ce1 > files > 550

python3-django-doc-1.6.7-1.fc20.noarch.rpm


<!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>Advanced tutorial: How to write reusable apps &mdash; Django 1.6.7 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.6.7',
        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.6.7 documentation" href="../index.html" />
    <link rel="up" title="Getting started" href="index.html" />
    <link rel="next" title="What to read next" href="whatsnext.html" />
    <link rel="prev" title="Writing your first Django app, part 6" href="tutorial06.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.6.7 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">
    &laquo; <a href="tutorial06.html" title="Writing your first Django app, part 6">previous</a> 
     |
    <a href="index.html" title="Getting started" accesskey="U">up</a>
   |
    <a href="whatsnext.html" title="What to read next">next</a> &raquo;</div>
    </div>
    
    <div id="bd">
      <div id="yui-main">
        <div class="yui-b">
          <div class="yui-g" id="intro-reusable-apps">
            
  <div class="section" id="s-advanced-tutorial-how-to-write-reusable-apps">
<span id="advanced-tutorial-how-to-write-reusable-apps"></span><h1>Advanced tutorial: How to write reusable apps<a class="headerlink" href="#advanced-tutorial-how-to-write-reusable-apps" title="Permalink to this headline">¶</a></h1>
<p>This advanced tutorial begins where <a class="reference internal" href="tutorial06.html"><em>Tutorial 6</em></a>
left off. We&#8217;ll be turning our Web-poll into a standalone Python package
you can reuse in new projects and share with other people.</p>
<p>If you haven&#8217;t recently completed Tutorials 1–6, we encourage you to review
these so that your example project matches the one described below.</p>
<div class="section" id="s-reusability-matters">
<span id="reusability-matters"></span><h2>Reusability matters<a class="headerlink" href="#reusability-matters" title="Permalink to this headline">¶</a></h2>
<p>It&#8217;s a lot of work to design, build, test and maintain a web application. Many
Python and Django projects share common problems. Wouldn&#8217;t it be great if we
could save some of this repeated work?</p>
<p>Reusability is the way of life in Python. <a class="reference external" href="http://guide.python-distribute.org/contributing.html#pypi-info">The Python Package Index (PyPI)</a> has a vast
range of packages you can use in your own Python programs. Check out <a class="reference external" href="https://www.djangopackages.com">Django
Packages</a> for existing reusable apps you could
incorporate in your project. Django itself is also just a Python package. This
means that you can take existing Python packages or Django apps and compose
them into your own web project. You only need to write the parts that make
your project unique.</p>
<p>Let&#8217;s say you were starting a new project that needed a polls app like the one
we&#8217;ve been working on. How do you make this app reusable? Luckily, you&#8217;re well
on the way already. In <a class="reference internal" href="tutorial03.html"><em>Tutorial 3</em></a>, we saw how we
could decouple polls from the project-level URLconf using an <tt class="docutils literal"><span class="pre">include</span></tt>.
In this tutorial, we&#8217;ll take further steps to make the app easy to use in new
projects and ready to publish for others to install and use.</p>
<div class="admonition-package-app admonition">
<p class="first admonition-title">Package? App?</p>
<p>A Python <a class="reference external" href="http://docs.python.org/tutorial/modules.html#packages">package</a>
provides a way of grouping related Python code for easy reuse. A package
contains one or more files of Python code (also known as &#8220;modules&#8221;).</p>
<p>A package can be imported with <tt class="docutils literal"><span class="pre">import</span> <span class="pre">foo.bar</span></tt> or <tt class="docutils literal"><span class="pre">from</span> <span class="pre">foo</span> <span class="pre">import</span>
<span class="pre">bar</span></tt>. For a directory (like <tt class="docutils literal"><span class="pre">polls</span></tt>) to form a package, it must contain
a special file <tt class="docutils literal"><span class="pre">__init__.py</span></tt>, even if this file is empty.</p>
<p>A Django <em>app</em> is just a Python package that is specifically intended for
use in a Django project. An app may also use common Django conventions,
such as having a <tt class="docutils literal"><span class="pre">models.py</span></tt> file.</p>
<p class="last">Later on we use the term <em>packaging</em> to describe the process of making a
Python package easy for others to install. It can be a little confusing, we
know.</p>
</div>
</div>
<div class="section" id="s-your-project-and-your-reusable-app">
<span id="your-project-and-your-reusable-app"></span><h2>Your project and your reusable app<a class="headerlink" href="#your-project-and-your-reusable-app" title="Permalink to this headline">¶</a></h2>
<p>After the previous tutorials, our project should look like this:</p>
<div class="highlight-python"><pre>mysite/
    manage.py
    mysite/
        __init__.py
        settings.py
        urls.py
        wsgi.py
    polls/
        __init__.py
        admin.py
        models.py
        static/
            polls/
                images/
                    background.gif
                style.css
        templates/
            polls/
                detail.html
                index.html
                results.html
        tests.py
        urls.py
        views.py
    templates/
        admin/
            base_site.html</pre>
</div>
<p>You created <tt class="docutils literal"><span class="pre">mysite/templates</span></tt> in <a class="reference internal" href="tutorial02.html"><em>Tutorial 2</em></a>,
and <tt class="docutils literal"><span class="pre">polls/templates</span></tt> in <a class="reference internal" href="tutorial03.html"><em>Tutorial 3</em></a>. Now perhaps
it is clearer why we chose to have separate template directories for the
project and application: everything that is part of the polls application is in
<tt class="docutils literal"><span class="pre">polls</span></tt>. It makes the application self-contained and easier to drop into a
new project.</p>
<p>The <tt class="docutils literal"><span class="pre">polls</span></tt> directory could now be copied into a new Django project and
immediately reused. It&#8217;s not quite ready to be published though. For that, we
need to package the app to make it easy for others to install.</p>
</div>
<div class="section" id="s-installing-some-prerequisites">
<span id="s-installing-reusable-apps-prerequisites"></span><span id="installing-some-prerequisites"></span><span id="installing-reusable-apps-prerequisites"></span><h2>Installing some prerequisites<a class="headerlink" href="#installing-some-prerequisites" title="Permalink to this headline">¶</a></h2>
<p>The current state of Python packaging is a bit muddled with various tools. For
this tutorial, we&#8217;re going to use <a class="reference external" href="https://pypi.python.org/pypi/setuptools">setuptools</a> to build our package. It&#8217;s the
recommended packaging tool (merged with the <tt class="docutils literal"><span class="pre">distribute</span></tt> fork). We&#8217;ll also be
using <a class="reference external" href="https://pypi.python.org/pypi/pip">pip</a> to install and uninstall it. You should install these
two packages now. If you need help, you can refer to <a class="reference internal" href="../topics/install.html#installing-official-release"><em>how to install
Django with pip</em></a>. You can install <tt class="docutils literal"><span class="pre">setuptools</span></tt>
the same way.</p>
</div>
<div class="section" id="s-packaging-your-app">
<span id="packaging-your-app"></span><h2>Packaging your app<a class="headerlink" href="#packaging-your-app" title="Permalink to this headline">¶</a></h2>
<p>Python <em>packaging</em> refers to preparing your app in a specific format that can
be easily installed and used. Django itself is packaged very much like
this. For a small app like polls, this process isn&#8217;t too difficult.</p>
<ol class="arabic simple">
<li>First, create a parent directory for <tt class="docutils literal"><span class="pre">polls</span></tt>, outside of your Django
project. Call this directory <tt class="docutils literal"><span class="pre">django-polls</span></tt>.</li>
</ol>
<div class="admonition-choosing-a-name-for-your-app admonition">
<p class="first admonition-title">Choosing a name for your app</p>
<p>When choosing a name for your package, check resources like PyPI to avoid
naming conflicts with existing packages. It&#8217;s often useful to prepend
<tt class="docutils literal"><span class="pre">django-</span></tt> to your module name when creating a package to distribute.
This helps others looking for Django apps identify your app as Django
specific.</p>
<blockquote class="last">
<div>The application names (that is, the final dotted part of the
path to the module containing <tt class="docutils literal"><span class="pre">models.py</span></tt>) defined in
<a class="reference internal" href="../ref/settings.html#std:setting-INSTALLED_APPS"><tt class="xref std std-setting docutils literal"><span class="pre">INSTALLED_APPS</span></tt></a> <em>must</em> be unique. Avoid using the
same name as any of the Django <a class="reference internal" href="../ref/contrib/index.html"><em>contrib packages</em></a>, for example <tt class="docutils literal"><span class="pre">auth</span></tt>, <tt class="docutils literal"><span class="pre">admin</span></tt> or
<tt class="docutils literal"><span class="pre">messages</span></tt>.</div></blockquote>
</div>
<ol class="arabic" start="2">
<li><p class="first">Move the <tt class="docutils literal"><span class="pre">polls</span></tt> directory into the <tt class="docutils literal"><span class="pre">django-polls</span></tt> directory.</p>
</li>
<li><p class="first">Create a file <tt class="docutils literal"><span class="pre">django-polls/README.rst</span></tt> with the following contents:</p>
<div class="highlight-python"><pre>=====
Polls
=====

Polls is a simple Django app to conduct Web-based polls. For each
question, visitors can choose between a fixed number of answers.

Detailed documentation is in the "docs" directory.

Quick start
-----------

1. Add "polls" to your INSTALLED_APPS setting like this::

      INSTALLED_APPS = (
          ...
          'polls',
      )

2. Include the polls URLconf in your project urls.py like this::

      url(r'^polls/', include('polls.urls')),

3. Run `python manage.py syncdb` to create the polls models.

4. Start the development server and visit http://127.0.0.1:8000/admin/
   to create a poll (you'll need the Admin app enabled).

5. Visit http://127.0.0.1:8000/polls/ to participate in the poll.</pre>
</div>
</li>
<li><p class="first">Create a <tt class="docutils literal"><span class="pre">django-polls/LICENSE</span></tt> file. Choosing a license is beyond the
scope of this tutorial, but suffice it to say that code released publicly
without a license is <em>useless</em>. Django and many Django-compatible apps are
distributed under the BSD license; however, you&#8217;re free to pick your own
license. Just be aware that your licensing choice will affect who is able
to use your code.</p>
</li>
<li><p class="first">Next we&#8217;ll create a <tt class="docutils literal"><span class="pre">setup.py</span></tt> file which provides details about how to
build and install the app. A full explanation of this file is beyond the
scope of this tutorial, but the <a class="reference external" href="http://pythonhosted.org/setuptools/setuptools.html">setuptools docs</a> have a good
explanation. Create a file <tt class="docutils literal"><span class="pre">django-polls/setup.py</span></tt> with the following
contents:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">import</span> <span class="nn">os</span>
<span class="kn">from</span> <span class="nn">setuptools</span> <span class="kn">import</span> <span class="n">setup</span>

<span class="n">README</span> <span class="o">=</span> <span class="nb">open</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="n">__file__</span><span class="p">),</span> <span class="s">&#39;README.rst&#39;</span><span class="p">))</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>

<span class="c"># allow setup.py to be run from any path</span>
<span class="n">os</span><span class="o">.</span><span class="n">chdir</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">normpath</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">abspath</span><span class="p">(</span><span class="n">__file__</span><span class="p">),</span> <span class="n">os</span><span class="o">.</span><span class="n">pardir</span><span class="p">)))</span>

<span class="n">setup</span><span class="p">(</span>
    <span class="n">name</span><span class="o">=</span><span class="s">&#39;django-polls&#39;</span><span class="p">,</span>
    <span class="n">version</span><span class="o">=</span><span class="s">&#39;0.1&#39;</span><span class="p">,</span>
    <span class="n">packages</span><span class="o">=</span><span class="p">[</span><span class="s">&#39;polls&#39;</span><span class="p">],</span>
    <span class="n">include_package_data</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span>
    <span class="n">license</span><span class="o">=</span><span class="s">&#39;BSD License&#39;</span><span class="p">,</span>  <span class="c"># example license</span>
    <span class="n">description</span><span class="o">=</span><span class="s">&#39;A simple Django app to conduct Web-based polls.&#39;</span><span class="p">,</span>
    <span class="n">long_description</span><span class="o">=</span><span class="n">README</span><span class="p">,</span>
    <span class="n">url</span><span class="o">=</span><span class="s">&#39;http://www.example.com/&#39;</span><span class="p">,</span>
    <span class="n">author</span><span class="o">=</span><span class="s">&#39;Your Name&#39;</span><span class="p">,</span>
    <span class="n">author_email</span><span class="o">=</span><span class="s">&#39;yourname@example.com&#39;</span><span class="p">,</span>
    <span class="n">classifiers</span><span class="o">=</span><span class="p">[</span>
        <span class="s">&#39;Environment :: Web Environment&#39;</span><span class="p">,</span>
        <span class="s">&#39;Framework :: Django&#39;</span><span class="p">,</span>
        <span class="s">&#39;Intended Audience :: Developers&#39;</span><span class="p">,</span>
        <span class="s">&#39;License :: OSI Approved :: BSD License&#39;</span><span class="p">,</span> <span class="c"># example license</span>
        <span class="s">&#39;Operating System :: OS Independent&#39;</span><span class="p">,</span>
        <span class="s">&#39;Programming Language :: Python&#39;</span><span class="p">,</span>
        <span class="s">&#39;Programming Language :: Python :: 2.6&#39;</span><span class="p">,</span>
        <span class="s">&#39;Programming Language :: Python :: 2.7&#39;</span><span class="p">,</span>
        <span class="s">&#39;Topic :: Internet :: WWW/HTTP&#39;</span><span class="p">,</span>
        <span class="s">&#39;Topic :: Internet :: WWW/HTTP :: Dynamic Content&#39;</span><span class="p">,</span>
    <span class="p">],</span>
<span class="p">)</span>
</pre></div>
</div>
</li>
<li><p class="first">Only Python modules and packages are included in the package by default. To
include additional files, we&#8217;ll need to create a <tt class="docutils literal"><span class="pre">MANIFEST.in</span></tt> file. The
setuptools docs referred to in the previous step discuss this file in more
details. To include the templates, the <tt class="docutils literal"><span class="pre">README.rst</span></tt> and our <tt class="docutils literal"><span class="pre">LICENSE</span></tt>
file, create a file <tt class="docutils literal"><span class="pre">django-polls/MANIFEST.in</span></tt> with the following
contents:</p>
<div class="highlight-python"><pre>include LICENSE
include README.rst
recursive-include polls/static *
recursive-include polls/templates *</pre>
</div>
</li>
<li><p class="first">It&#8217;s optional, but recommended, to include detailed documentation with your
app. Create an empty directory <tt class="docutils literal"><span class="pre">django-polls/docs</span></tt> for future
documentation. Add an additional line to <tt class="docutils literal"><span class="pre">django-polls/MANIFEST.in</span></tt>:</p>
<div class="highlight-python"><pre>recursive-include docs *</pre>
</div>
<p>Note that the <tt class="docutils literal"><span class="pre">docs</span></tt> directory won&#8217;t be included in your package unless
you add some files to it. Many Django apps also provide their documentation
online through sites like <a class="reference external" href="https://readthedocs.org">readthedocs.org</a>.</p>
</li>
<li><p class="first">Try building your package with <tt class="docutils literal"><span class="pre">python</span> <span class="pre">setup.py</span> <span class="pre">sdist</span></tt> (run from inside
<tt class="docutils literal"><span class="pre">django-polls</span></tt>). This creates a directory called <tt class="docutils literal"><span class="pre">dist</span></tt> and builds your
new package, <tt class="docutils literal"><span class="pre">django-polls-0.1.tar.gz</span></tt>.</p>
</li>
</ol>
<p>For more information on packaging, see <a class="reference external" href="http://guide.python-distribute.org/quickstart.html">The Hitchhiker&#8217;s Guide to Packaging</a>.</p>
</div>
<div class="section" id="s-using-your-own-package">
<span id="using-your-own-package"></span><h2>Using your own package<a class="headerlink" href="#using-your-own-package" title="Permalink to this headline">¶</a></h2>
<p>Since we moved the <tt class="docutils literal"><span class="pre">polls</span></tt> directory out of the project, it&#8217;s no longer
working. We&#8217;ll now fix this by installing our new <tt class="docutils literal"><span class="pre">django-polls</span></tt> package.</p>
<div class="admonition-installing-as-a-user-library admonition">
<p class="first admonition-title">Installing as a user library</p>
<p>The following steps install <tt class="docutils literal"><span class="pre">django-polls</span></tt> as a user library. Per-user
installs have a lot of advantages over installing the package system-wide,
such as being usable on systems where you don&#8217;t have administrator access
as well as preventing the package from affecting system services and other
users of the machine. Python 2.6 added support for user libraries, so if
you are using an older version this won&#8217;t work, but Django 1.5 requires
Python 2.6 or newer anyway.</p>
<p class="last">Note that per-user installations can still affect the behavior of system
tools that run as that user, so <tt class="docutils literal"><span class="pre">virtualenv</span></tt> is a more robust solution
(see below).</p>
</div>
<ol class="arabic">
<li><p class="first">To install the package, use pip (you already <a class="reference internal" href="#installing-reusable-apps-prerequisites"><em>installed it</em></a>, right?):</p>
<div class="highlight-python"><pre>pip install --user django-polls/dist/django-polls-0.1.tar.gz</pre>
</div>
</li>
<li><p class="first">With luck, your Django project should now work correctly again. Run the
server again to confirm this.</p>
</li>
<li><p class="first">To uninstall the package, use pip:</p>
<div class="highlight-python"><pre>pip uninstall django-polls</pre>
</div>
</li>
</ol>
</div>
<div class="section" id="s-publishing-your-app">
<span id="publishing-your-app"></span><h2>Publishing your app<a class="headerlink" href="#publishing-your-app" title="Permalink to this headline">¶</a></h2>
<p>Now that we&#8217;ve packaged and tested <tt class="docutils literal"><span class="pre">django-polls</span></tt>, it&#8217;s ready to share with
the world! If this wasn&#8217;t just an example, you could now:</p>
<ul class="simple">
<li>Email the package to a friend.</li>
<li>Upload the package on your Web site.</li>
<li>Post the package on a public repository, such as <a class="reference external" href="http://guide.python-distribute.org/contributing.html#pypi-info">The Python Package Index
(PyPI)</a>.</li>
</ul>
<p>For more information on PyPI, see the <a class="reference external" href="http://guide.python-distribute.org/quickstart.html#register-your-package-with-the-python-package-index-pypi">Quickstart</a>
section of The Hitchhiker&#8217;s Guide to Packaging. One detail this guide mentions
is choosing the license under which your code is distributed.</p>
</div>
<div class="section" id="s-installing-python-packages-with-virtualenv">
<span id="installing-python-packages-with-virtualenv"></span><h2>Installing Python packages with virtualenv<a class="headerlink" href="#installing-python-packages-with-virtualenv" title="Permalink to this headline">¶</a></h2>
<p>Earlier, we installed the polls app as a user library. This has some
disadvantages:</p>
<ul class="simple">
<li>Modifying the user libraries can affect other Python software on your system.</li>
<li>You won&#8217;t be able to run multiple versions of this package (or others with
the same name).</li>
</ul>
<p>Typically, these situations only arise once you&#8217;re maintaining several Django
projects. When they do, the best solution is to use <a class="reference external" href="http://www.virtualenv.org/">virtualenv</a>. This tool allows you to maintain multiple
isolated Python environments, each with its own copy of the libraries and
package namespace.</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="#">Advanced tutorial: How to write reusable apps</a><ul>
<li><a class="reference internal" href="#reusability-matters">Reusability matters</a></li>
<li><a class="reference internal" href="#your-project-and-your-reusable-app">Your project and your reusable app</a></li>
<li><a class="reference internal" href="#installing-some-prerequisites">Installing some prerequisites</a></li>
<li><a class="reference internal" href="#packaging-your-app">Packaging your app</a></li>
<li><a class="reference internal" href="#using-your-own-package">Using your own package</a></li>
<li><a class="reference internal" href="#publishing-your-app">Publishing your app</a></li>
<li><a class="reference internal" href="#installing-python-packages-with-virtualenv">Installing Python packages with virtualenv</a></li>
</ul>
</li>
</ul>

  <h3>Browse</h3>
  <ul>
    
      <li>Prev: <a href="tutorial06.html">Writing your first Django app, part 6</a></li>
    
    
      <li>Next: <a href="whatsnext.html">What to read next</a></li>
    
  </ul>
  <h3>You are here:</h3>
  <ul>
      <li>
        <a href="../index.html">Django 1.6.7 documentation</a>
        
          <ul><li><a href="index.html">Getting started</a>
        
        <ul><li>Advanced tutorial: How to write reusable apps</li></ul>
        </li></ul>
      </li>
  </ul>  

  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/intro/reusable-apps.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">Sep 26, 2014</p>
          </div> 
        
      
    </div>
    
    <div id="ft">
      <div class="nav">
    &laquo; <a href="tutorial06.html" title="Writing your first Django app, part 6">previous</a> 
     |
    <a href="index.html" title="Getting started" accesskey="U">up</a>
   |
    <a href="whatsnext.html" title="What to read next">next</a> &raquo;</div>
    </div>
  </div>

      <div class="clearer"></div>
    </div>
  </body>
</html>