Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > 57efe471f3561e70a829edf1b0e9f507 > files > 2304

python-django-1.1.4-0.1mdv2010.2.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>contrib packages &mdash; Django v1.1 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.1',
        COLLAPSE_MODINDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../_static/doctools.js"></script>
    <link rel="top" title="Django v1.1 documentation" href="../../index.html" />
    <link rel="up" title="API Reference" href="../index.html" />
    <link rel="next" title="The Django admin site" href="admin/index.html" />
    <link rel="prev" title="Authentication backends" href="../authbackends.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 = "../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 v1.1 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="../../modindex.html">Modules</a>
      </div>
      <div class="nav">
    &laquo; <a href="../authbackends.html" title="Authentication backends">previous</a> 
     |
    <a href="../index.html" title="API Reference" accesskey="U">up</a>
   |
    <a href="admin/index.html" title="The Django admin site">next</a> &raquo;</div>
    </div>
    
    <div id="bd">
      <div id="yui-main">
        <div class="yui-b">
          <div class="yui-g" id="ref-contrib-index">
            
  <div class="section" id="s-contrib-packages">
<span id="s-ref-contrib-index"></span><span id="contrib-packages"></span><span id="ref-contrib-index"></span><h1><tt class="docutils literal"><span class="pre">contrib</span></tt> packages<a class="headerlink" href="#contrib-packages" title="Permalink to this headline">¶</a></h1>
<p>Django aims to follow Python&#8217;s <a class="reference external" href="http://docs.python.org/tutorial/stdlib.html#batteries-included">&#8220;batteries included&#8221; philosophy</a>. It ships
with a variety of extra, optional tools that solve common Web-development
problems.</p>
<p>This code lives in <tt class="docutils literal"><span class="pre">django/contrib</span></tt> in the Django distribution. This document
gives a rundown of the packages in <tt class="docutils literal"><span class="pre">contrib</span></tt>, along with any dependencies
those packages have.</p>
<div class="admonition-note admonition ">
<p class="first admonition-title">Note</p>
<p class="last">For most of these add-ons &#8211; specifically, the add-ons that include either
models or template tags &#8211; you&#8217;ll need to add the package name (e.g.,
<tt class="docutils literal"><span class="pre">'django.contrib.admin'</span></tt>) to your <tt class="docutils literal"><span class="pre">INSTALLED_APPS</span></tt> setting and re-run
<tt class="docutils literal"><span class="pre">manage.py</span> <span class="pre">syncdb</span></tt>.</p>
</div>
<ul>
<li class="toctree-l1"><a class="reference external" href="admin/index.html">The Django admin site</a></li>
<li class="toctree-l1"><a class="reference external" href="auth.html"><tt class="docutils literal"><span class="pre">django.contrib.auth</span></tt></a></li>
<li class="toctree-l1"><a class="reference external" href="comments/index.html">Django&#8217;s comments framework</a></li>
<li class="toctree-l1"><a class="reference external" href="contenttypes.html">The contenttypes framework</a></li>
<li class="toctree-l1"><a class="reference external" href="csrf.html">Cross Site Request Forgery protection</a></li>
<li class="toctree-l1"><a class="reference external" href="databrowse.html">Databrowse</a></li>
<li class="toctree-l1"><a class="reference external" href="flatpages.html">The flatpages app</a></li>
<li class="toctree-l1"><a class="reference external" href="formtools/index.html">django.contrib.formtools</a></li>
<li class="toctree-l1"><a class="reference external" href="humanize.html">django.contrib.humanize</a></li>
<li class="toctree-l1"><a class="reference external" href="localflavor.html">The &#8220;local flavor&#8221; add-ons</a></li>
<li class="toctree-l1"><a class="reference external" href="redirects.html">The redirects app</a></li>
<li class="toctree-l1"><a class="reference external" href="sitemaps.html">The sitemap framework</a></li>
<li class="toctree-l1"><a class="reference external" href="sites.html">The &#8220;sites&#8221; framework</a></li>
<li class="toctree-l1"><a class="reference external" href="syndication.html">The syndication feed framework</a></li>
<li class="toctree-l1"><a class="reference external" href="webdesign.html">django.contrib.webdesign</a></li>
</ul>
<div class="section" id="s-admin">
<span id="admin"></span><h2>admin<a class="headerlink" href="#admin" title="Permalink to this headline">¶</a></h2>
<p>The automatic Django administrative interface. For more information, see
<a class="reference external" href="../../intro/tutorial02.html#intro-tutorial02"><em>Tutorial 2</em></a> and the
<a class="reference external" href="admin/index.html#ref-contrib-admin"><em>admin documentation</em></a>.</p>
<p>Requires the <a class="reference internal" href="#auth">auth</a> and <a class="reference internal" href="#contenttypes">contenttypes</a> contrib packages to be installed.</p>
</div>
<div class="section" id="s-auth">
<span id="auth"></span><h2>auth<a class="headerlink" href="#auth" title="Permalink to this headline">¶</a></h2>
<p>Django&#8217;s authentication framework.</p>
<p>See <a class="reference external" href="../../topics/auth.html#topics-auth"><em>User authentication in Django</em></a>.</p>
</div>
<div class="section" id="s-comments">
<span id="comments"></span><h2>comments<a class="headerlink" href="#comments" title="Permalink to this headline">¶</a></h2>
<div class="versionchanged">
<span class="title">Changed in Django 1.0:</span> The comments application has been rewriten. See <a class="reference external" href="comments/upgrade.html#ref-contrib-comments-upgrade"><em>Upgrading from Django&#8217;s previous comment system</em></a>
for information on howto upgrade.</div>
<p>A simple yet flexible comments system. See <a class="reference external" href="comments/index.html#ref-contrib-comments-index"><em>Django&#8217;s comments framework</em></a>.</p>
</div>
<div class="section" id="s-contenttypes">
<span id="contenttypes"></span><h2>contenttypes<a class="headerlink" href="#contenttypes" title="Permalink to this headline">¶</a></h2>
<p>A light framework for hooking into &#8220;types&#8221; of content, where each installed
Django model is a separate content type.</p>
<p>See the <a class="reference external" href="contenttypes.html#ref-contrib-contenttypes"><em>contenttypes documentation</em></a>.</p>
</div>
<div class="section" id="s-csrf">
<span id="csrf"></span><h2>csrf<a class="headerlink" href="#csrf" title="Permalink to this headline">¶</a></h2>
<p>A middleware for preventing Cross Site Request Forgeries</p>
<p>See the <a class="reference external" href="csrf.html#ref-contrib-csrf"><em>csrf documentation</em></a>.</p>
</div>
<div class="section" id="s-flatpages">
<span id="flatpages"></span><h2>flatpages<a class="headerlink" href="#flatpages" title="Permalink to this headline">¶</a></h2>
<p>A framework for managing simple &#8220;flat&#8221; HTML content in a database.</p>
<p>See the <a class="reference external" href="flatpages.html#ref-contrib-flatpages"><em>flatpages documentation</em></a>.</p>
<p>Requires the <a class="reference internal" href="#sites">sites</a> contrib package to be installed as well.</p>
</div>
<div class="section" id="s-formtools">
<span id="formtools"></span><h2>formtools<a class="headerlink" href="#formtools" title="Permalink to this headline">¶</a></h2>
<p>A set of high-level abstractions for Django forms (django.forms).</p>
<div class="section" id="s-django-contrib-formtools-preview">
<span id="django-contrib-formtools-preview"></span><h3>django.contrib.formtools.preview<a class="headerlink" href="#django-contrib-formtools-preview" title="Permalink to this headline">¶</a></h3>
<p>An abstraction of the following workflow:</p>
<p>&#8220;Display an HTML form, force a preview, then do something with the submission.&#8221;</p>
<p>See the <a class="reference external" href="formtools/form-preview.html#ref-contrib-formtools-form-preview"><em>form preview documentation</em></a>.</p>
</div>
<div class="section" id="s-django-contrib-formtools-wizard">
<span id="django-contrib-formtools-wizard"></span><h3>django.contrib.formtools.wizard<a class="headerlink" href="#django-contrib-formtools-wizard" title="Permalink to this headline">¶</a></h3>
<p>Splits forms across multiple Web pages.</p>
<p>See the <a class="reference external" href="formtools/form-wizard.html#ref-contrib-formtools-form-wizard"><em>form wizard documentation</em></a>.</p>
</div>
</div>
<div class="section" id="s-humanize">
<span id="humanize"></span><h2>humanize<a class="headerlink" href="#humanize" title="Permalink to this headline">¶</a></h2>
<p>A set of Django template filters useful for adding a &#8220;human touch&#8221; to data.</p>
<p>See the <a class="reference external" href="humanize.html#ref-contrib-humanize"><em>humanize documentation</em></a>.</p>
</div>
<div class="section" id="s-localflavor">
<span id="localflavor"></span><h2>localflavor<a class="headerlink" href="#localflavor" title="Permalink to this headline">¶</a></h2>
<p>A collection of various Django snippets that are useful only for a particular
country or culture. For example, <tt class="docutils literal"><span class="pre">django.contrib.localflavor.us.forms</span></tt>
contains a <tt class="docutils literal"><span class="pre">USZipCodeField</span></tt> that you can use to validate U.S. zip codes.</p>
<p>See the <a class="reference external" href="localflavor.html#ref-contrib-localflavor"><em>localflavor documentation</em></a>.</p>
</div>
<div class="section" id="s-markup">
<span id="s-ref-contrib-markup"></span><span id="markup"></span><span id="ref-contrib-markup"></span><h2>markup<a class="headerlink" href="#markup" title="Permalink to this headline">¶</a></h2>
<p>A collection of template filters that implement common markup languages:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">textile</span></tt> &#8211; implements <a class="reference external" href="http://en.wikipedia.org/wiki/Textile_%28markup_language%29">Textile</a> &#8211; requires <a class="reference external" href="http://loopcore.com/python-textile/">PyTextile</a></li>
<li><tt class="docutils literal"><span class="pre">markdown</span></tt> &#8211; implements <a class="reference external" href="http://en.wikipedia.org/wiki/Markdown">Markdown</a> &#8211; requires <a class="reference external" href="http://www.freewisdom.org/projects/python-markdown">Python-markdown</a></li>
<li><tt class="docutils literal"><span class="pre">restructuredtext</span></tt> &#8211; implements <a class="reference external" href="http://en.wikipedia.org/wiki/ReStructuredText">ReST (ReStructured Text)</a>
&#8211; requires <a class="reference external" href="http://docutils.sf.net/">doc-utils</a></li>
</ul>
<p>In each case, the filter expects formatted markup as a string and returns a
string representing the marked-up text. For example, the <tt class="docutils literal"><span class="pre">textile</span></tt> filter
converts text that is marked-up in Textile format to HTML.</p>
<p>To activate these filters, add <tt class="docutils literal"><span class="pre">'django.contrib.markup'</span></tt> to your
<a class="reference external" href="../settings.html#setting-INSTALLED_APPS"><tt class="xref docutils literal"><span class="pre">INSTALLED_APPS</span></tt></a> setting. Once you&#8217;ve done that, use
<tt class="docutils literal"><span class="pre">{%</span> <span class="pre">load</span> <span class="pre">markup</span> <span class="pre">%}</span></tt> in a template, and you&#8217;ll have access to these filters.
For more documentation, read the source code in
<tt class="docutils literal"><span class="pre">django/contrib/markup/templatetags/markup.py</span></tt>.</p>
<div class="section" id="s-restructured-text">
<span id="restructured-text"></span><h3>ReStructured Text<a class="headerlink" href="#restructured-text" title="Permalink to this headline">¶</a></h3>
<p>When using the <cite>restructuredtext</cite> markup filter you can define a <tt class="xref docutils literal"><span class="pre">RESTRUCTUREDTEXT_FORMAT_SETTINGS</span></tt>
in your django settings to override the default writer settings. See the <a class="reference external" href="http://docutils.sourceforge.net/docs/user/config.html#html4css1-writer">restructuredtext writer settings</a> for
details on what these settings are.</p>
</div>
</div>
<div class="section" id="s-redirects">
<span id="redirects"></span><h2>redirects<a class="headerlink" href="#redirects" title="Permalink to this headline">¶</a></h2>
<p>A framework for managing redirects.</p>
<p>See the <a class="reference external" href="redirects.html#ref-contrib-redirects"><em>redirects documentation</em></a>.</p>
</div>
<div class="section" id="s-sessions">
<span id="sessions"></span><h2>sessions<a class="headerlink" href="#sessions" title="Permalink to this headline">¶</a></h2>
<p>A framework for storing data in anonymous sessions.</p>
<p>See the <a class="reference external" href="../../topics/http/sessions.html#topics-http-sessions"><em>sessions documentation</em></a>.</p>
</div>
<div class="section" id="s-sites">
<span id="sites"></span><h2>sites<a class="headerlink" href="#sites" title="Permalink to this headline">¶</a></h2>
<p>A light framework that lets you operate multiple Web sites off of the same
database and Django installation. It gives you hooks for associating objects to
one or more sites.</p>
<p>See the <a class="reference external" href="sites.html#ref-contrib-sites"><em>sites documentation</em></a>.</p>
</div>
<div class="section" id="s-sitemaps">
<span id="sitemaps"></span><h2>sitemaps<a class="headerlink" href="#sitemaps" title="Permalink to this headline">¶</a></h2>
<p>A framework for generating Google sitemap XML files.</p>
<p>See the <a class="reference external" href="sitemaps.html#ref-contrib-sitemaps"><em>sitemaps documentation</em></a>.</p>
</div>
<div class="section" id="s-syndication">
<span id="syndication"></span><h2>syndication<a class="headerlink" href="#syndication" title="Permalink to this headline">¶</a></h2>
<p>A framework for generating syndication feeds, in RSS and Atom, quite easily.</p>
<p>See the <a class="reference external" href="syndication.html#ref-contrib-syndication"><em>syndication documentation</em></a>.</p>
</div>
<div class="section" id="s-webdesign">
<span id="webdesign"></span><h2>webdesign<a class="headerlink" href="#webdesign" title="Permalink to this headline">¶</a></h2>
<p>Helpers and utilities targeted primarily at Web <em>designers</em> rather than
Web <em>developers</em>.</p>
<p>See the <a class="reference external" href="webdesign.html#ref-contrib-webdesign"><em>Web design helpers documentation</em></a>.</p>
</div>
<div class="section" id="s-other-add-ons">
<span id="other-add-ons"></span><h2>Other add-ons<a class="headerlink" href="#other-add-ons" title="Permalink to this headline">¶</a></h2>
<p>If you have an idea for functionality to include in <tt class="docutils literal"><span class="pre">contrib</span></tt>, let us know!
Code it up, and post it to the <a class="reference external" href="http://groups.google.com/group/django-users">django-users mailing list</a>.</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 external" href="#"><tt class="docutils literal"><span class="pre">contrib</span></tt> packages</a><ul>
<li><a class="reference external" href="#admin">admin</a></li>
<li><a class="reference external" href="#auth">auth</a></li>
<li><a class="reference external" href="#comments">comments</a></li>
<li><a class="reference external" href="#contenttypes">contenttypes</a></li>
<li><a class="reference external" href="#csrf">csrf</a></li>
<li><a class="reference external" href="#flatpages">flatpages</a></li>
<li><a class="reference external" href="#formtools">formtools</a><ul>
<li><a class="reference external" href="#django-contrib-formtools-preview">django.contrib.formtools.preview</a></li>
<li><a class="reference external" href="#django-contrib-formtools-wizard">django.contrib.formtools.wizard</a></li>
</ul>
</li>
<li><a class="reference external" href="#humanize">humanize</a></li>
<li><a class="reference external" href="#localflavor">localflavor</a></li>
<li><a class="reference external" href="#markup">markup</a><ul>
<li><a class="reference external" href="#restructured-text">ReStructured Text</a></li>
</ul>
</li>
<li><a class="reference external" href="#redirects">redirects</a></li>
<li><a class="reference external" href="#sessions">sessions</a></li>
<li><a class="reference external" href="#sites">sites</a></li>
<li><a class="reference external" href="#sitemaps">sitemaps</a></li>
<li><a class="reference external" href="#syndication">syndication</a></li>
<li><a class="reference external" href="#webdesign">webdesign</a></li>
<li><a class="reference external" href="#other-add-ons">Other add-ons</a></li>
</ul>
</li>
</ul>

  <h3>Browse</h3>
  <ul>
    
      <li>Prev: <a href="../authbackends.html">Authentication backends</a></li>
    
    
      <li>Next: <a href="admin/index.html">The Django admin site</a></li>
    
  </ul>
  <h3>You are here:</h3>
  <ul>
      <li>
        <a href="../../index.html">Django v1.1 documentation</a>
        
          <ul><li><a href="../index.html">API Reference</a>
        
        <ul><li><tt class="docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal"><span class="pre">contrib</span></tt> packages</li></ul>
        </li></ul>
      </li>
  </ul>  

            <h3>This Page</h3>
            <ul class="this-page-menu">
              <li><a href="../../_sources/ref/contrib/index.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" size="18" />
                <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">Feb 18, 2011</p>
          </div> 
        
      
    </div>
    
    <div id="ft">
      <div class="nav">
    &laquo; <a href="../authbackends.html" title="Authentication backends">previous</a> 
     |
    <a href="../index.html" title="API Reference" accesskey="U">up</a>
   |
    <a href="admin/index.html" title="The Django admin site">next</a> &raquo;</div>
    </div>
  </div>

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