Sophie

Sophie

distrib > Arklinux > devel > i586 > media > main > by-pkgid > 5fcb1fedf34660bc240dc59b7bfcebc4 > files > 375

django-doc-1.2.3-1ark.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>Django Exceptions &mdash; Django v1.2 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.2',
        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 v1.2 documentation" href="../index.html" />
    <link rel="up" title="API Reference" href="index.html" />
    <link rel="next" title="File handling" href="files/index.html" />
    <link rel="prev" title="django-admin.py and manage.py" href="django-admin.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.2 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="django-admin.html" title="django-admin.py and manage.py">previous</a> 
     |
    <a href="index.html" title="API Reference" accesskey="U">up</a>
   |
    <a href="files/index.html" title="File handling">next</a> &raquo;</div>
    </div>
    
    <div id="bd">
      <div id="yui-main">
        <div class="yui-b">
          <div class="yui-g" id="ref-exceptions">
            
  <div class="section" id="s-django-exceptions">
<span id="django-exceptions"></span><h1>Django Exceptions<a class="headerlink" href="#django-exceptions" title="Permalink to this headline">¶</a></h1>
<p>Django raises some Django specific exceptions as well as many standard
Python exceptions.</p>
<div class="section" id="s-module-django.core.exceptions">
<span id="s-django-specific-exceptions"></span><span id="module-django.core.exceptions"></span><span id="django-specific-exceptions"></span><h2>Django-specific Exceptions<a class="headerlink" href="#module-django.core.exceptions" title="Permalink to this headline">¶</a></h2>
<div class="section" id="s-objectdoesnotexist-and-doesnotexist">
<span id="objectdoesnotexist-and-doesnotexist"></span><h3>ObjectDoesNotExist and DoesNotExist<a class="headerlink" href="#objectdoesnotexist-and-doesnotexist" title="Permalink to this headline">¶</a></h3>
<p>The <tt class="docutils literal"><span class="pre">DoesNotExist</span></tt> exception is raised when an object is not found
for the given parameters of a query.</p>
<p><tt class="docutils literal"><span class="pre">ObjectDoesNotExist</span></tt> is defined in <tt class="docutils literal"><span class="pre">django.core.exceptions</span></tt>.
<tt class="docutils literal"><span class="pre">DoesNotExist</span></tt> is a subclass of the base <tt class="docutils literal"><span class="pre">ObjectDoesNotExist</span></tt>
exception that is provided on every model class as a way of
identifying the specific type of object that could not be found.</p>
<p>See <a class="reference internal" href="models/querysets.html#django.db.models.QuerySet.get" title="django.db.models.QuerySet.get"><tt class="xref py py-meth docutils literal"><span class="pre">get()</span></tt></a> for further information
on <tt class="docutils literal"><span class="pre">ObjectDoesNotExist</span></tt> and <tt class="docutils literal"><span class="pre">DoesNotExist</span></tt>.</p>
</div>
<div class="section" id="s-multipleobjectsreturned">
<span id="multipleobjectsreturned"></span><h3>MultipleObjectsReturned<a class="headerlink" href="#multipleobjectsreturned" title="Permalink to this headline">¶</a></h3>
<p>The <tt class="docutils literal"><span class="pre">MultipleObjectsReturned</span></tt> exception is raised by a query if only
one object is expected, but multiple objects are returned. A base version
of this exception is provided in <tt class="docutils literal"><span class="pre">django.core.exceptions</span></tt>; each model
class contains a subclassed version that can be used to identify the
specific object type that has returned multiple objects.</p>
<p>See <a class="reference internal" href="models/querysets.html#django.db.models.QuerySet.get" title="django.db.models.QuerySet.get"><tt class="xref py py-meth docutils literal"><span class="pre">get()</span></tt></a> for further information.</p>
</div>
<div class="section" id="s-suspiciousoperation">
<span id="suspiciousoperation"></span><h3>SuspiciousOperation<a class="headerlink" href="#suspiciousoperation" title="Permalink to this headline">¶</a></h3>
<p>The <tt class="docutils literal"><span class="pre">SuspiciousOperation</span></tt> exception is raised when a user has performed
an operation that should be considered suspicious from a security perspective,
such as tampering with a session cookie.</p>
</div>
<div class="section" id="s-permissiondenied">
<span id="permissiondenied"></span><h3>PermissionDenied<a class="headerlink" href="#permissiondenied" title="Permalink to this headline">¶</a></h3>
<p>The <tt class="docutils literal"><span class="pre">PermissionDenied</span></tt> exception is raised when a user does not have
permission to perform the action requested.</p>
</div>
<div class="section" id="s-viewdoesnotexist">
<span id="viewdoesnotexist"></span><h3>ViewDoesNotExist<a class="headerlink" href="#viewdoesnotexist" title="Permalink to this headline">¶</a></h3>
<p>The <tt class="docutils literal"><span class="pre">ViewDoesNotExist</span></tt> exception is raised by
<tt class="docutils literal"><span class="pre">django.core.urlresolvers</span></tt> when a requested view does not exist.</p>
</div>
<div class="section" id="s-middlewarenotused">
<span id="middlewarenotused"></span><h3>MiddlewareNotUsed<a class="headerlink" href="#middlewarenotused" title="Permalink to this headline">¶</a></h3>
<p>The <tt class="docutils literal"><span class="pre">MiddlewareNotUsed</span></tt> exception is raised when a middleware is not
used in the server configuration.</p>
</div>
<div class="section" id="s-improperlyconfigured">
<span id="improperlyconfigured"></span><h3>ImproperlyConfigured<a class="headerlink" href="#improperlyconfigured" title="Permalink to this headline">¶</a></h3>
<p>The <tt class="docutils literal"><span class="pre">ImproperlyConfigured</span></tt> exception is raised when Django is
somehow improperly configured &#8211; for example, if a value in <tt class="docutils literal"><span class="pre">settings.py</span></tt>
is incorrect or unparseable.</p>
</div>
<div class="section" id="s-fielderror">
<span id="fielderror"></span><h3>FieldError<a class="headerlink" href="#fielderror" title="Permalink to this headline">¶</a></h3>
<p>The <tt class="docutils literal"><span class="pre">FieldError</span></tt> exception is raised when there is a problem with a
model field. This can happen for several reasons:</p>
<ul class="simple">
<li>A field in a model clashes with a field of the same name from an
abstract base class</li>
<li>An infinite loop is caused by ordering</li>
<li>A keyword cannot be parsed from the filter parameters</li>
<li>If a field cannot be determined from a keyword in the query
parameters</li>
<li>If a join is not permitted on the specified field</li>
<li>If a field name is invalid</li>
<li>If a query contains invalid order_by arguments</li>
</ul>
</div>
</div>
<div class="section" id="s-database-exceptions">
<span id="database-exceptions"></span><h2>Database Exceptions<a class="headerlink" href="#database-exceptions" title="Permalink to this headline">¶</a></h2>
<p>Django wraps the standard database exceptions <tt class="docutils literal"><span class="pre">DatabaseError</span></tt> and
<tt class="docutils literal"><span class="pre">IntegrityError</span></tt> so that your Django code has a guaranteed common
implementation of these classes. These database exceptions are
provided in <tt class="docutils literal"><span class="pre">django.db</span></tt>.</p>
<p>The Django wrappers for database exceptions behave exactly the same as
the underlying database exceptions. See <a class="reference external" href="http://www.python.org/dev/peps/pep-0249/">PEP 249 - Python Database API
Specification v2.0</a> for further information.</p>
</div>
<div class="section" id="s-python-exceptions">
<span id="python-exceptions"></span><h2>Python Exceptions<a class="headerlink" href="#python-exceptions" title="Permalink to this headline">¶</a></h2>
<p>Django raises built-in Python exceptions when appropriate as well. See
the Python <a class="reference external" href="http://docs.python.org/lib/module-exceptions.html">documentation</a> for further information on the built-in
exceptions.</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 Exceptions</a><ul>
<li><a class="reference internal" href="#module-django.core.exceptions">Django-specific Exceptions</a><ul>
<li><a class="reference internal" href="#objectdoesnotexist-and-doesnotexist">ObjectDoesNotExist and DoesNotExist</a></li>
<li><a class="reference internal" href="#multipleobjectsreturned">MultipleObjectsReturned</a></li>
<li><a class="reference internal" href="#suspiciousoperation">SuspiciousOperation</a></li>
<li><a class="reference internal" href="#permissiondenied">PermissionDenied</a></li>
<li><a class="reference internal" href="#viewdoesnotexist">ViewDoesNotExist</a></li>
<li><a class="reference internal" href="#middlewarenotused">MiddlewareNotUsed</a></li>
<li><a class="reference internal" href="#improperlyconfigured">ImproperlyConfigured</a></li>
<li><a class="reference internal" href="#fielderror">FieldError</a></li>
</ul>
</li>
<li><a class="reference internal" href="#database-exceptions">Database Exceptions</a></li>
<li><a class="reference internal" href="#python-exceptions">Python Exceptions</a></li>
</ul>
</li>
</ul>

  <h3>Browse</h3>
  <ul>
    
      <li>Prev: <a href="django-admin.html">django-admin.py and manage.py</a></li>
    
    
      <li>Next: <a href="files/index.html">File handling</a></li>
    
  </ul>
  <h3>You are here:</h3>
  <ul>
      <li>
        <a href="../index.html">Django v1.2 documentation</a>
        
          <ul><li><a href="index.html">API Reference</a>
        
        <ul><li>Django Exceptions</li></ul>
        </li></ul>
      </li>
  </ul>  

  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/ref/exceptions.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">Oct 20, 2010</p>
          </div> 
        
      
    </div>
    
    <div id="ft">
      <div class="nav">
    &laquo; <a href="django-admin.html" title="django-admin.py and manage.py">previous</a> 
     |
    <a href="index.html" title="API Reference" accesskey="U">up</a>
   |
    <a href="files/index.html" title="File handling">next</a> &raquo;</div>
    </div>
  </div>

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