From de46b6687f3ed9b35def38df5f4f74a304f3112c Mon Sep 17 00:00:00 2001 From: Gabriel Hurley Date: Thu, 3 Mar 2011 19:32:55 +0000 Subject: [PATCH] [1.2.X] Added crossref targets for a couple of Django exceptions and cleaned up related reST markup. Backport of [15733] from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@15734 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/ref/databases.txt | 2 +- docs/ref/exceptions.txt | 15 +++++++++++++++ docs/ref/templates/builtins.txt | 13 ++++++++----- docs/topics/db/index.txt | 2 ++ 4 files changed, 26 insertions(+), 6 deletions(-) diff --git a/docs/ref/databases.txt b/docs/ref/databases.txt index a6d73b3dcc..6f1ce5deae 100644 --- a/docs/ref/databases.txt +++ b/docs/ref/databases.txt @@ -231,7 +231,7 @@ MySQLdb 1.2.1p2 or 1.2.2, you should still use ``utf8_collation_ci_swedish`` table (usually called ``django_session``) and the :class:`django.contrib.admin.models.LogEntry` table (usually called ``django_admin_log``). Those are the two standard tables that use -:class:`~django.db.model.TextField` internally. +:class:`~django.db.models.TextField` internally. .. _fixed in MySQLdb 1.2.2: http://sourceforge.net/tracker/index.php?func=detail&aid=1495765&group_id=22307&atid=374932 diff --git a/docs/ref/exceptions.txt b/docs/ref/exceptions.txt index f1246bf5af..947815b7fe 100644 --- a/docs/ref/exceptions.txt +++ b/docs/ref/exceptions.txt @@ -104,6 +104,18 @@ ValidationError :ref:`Model Field Validation ` and the :doc:`Validator Reference `. +.. currentmodule:: django.core.urlresolvers + +NoReverseMatch +-------------- +.. exception:: NoReverseMatch + + The :exc:`NoReverseMatch` exception is raised by + :mod:`django.core.urlresolvers` when a matching URL in your URLconf + cannot be identified based on the parameters supplied. + +.. currentmodule:: django.db + Database Exceptions =================== @@ -112,6 +124,9 @@ Django wraps the standard database exceptions :exc:`DatabaseError` and implementation of these classes. These database exceptions are provided in :mod:`django.db`. +.. exception:: DatabaseError +.. exception:: IntegrityError + The Django wrappers for database exceptions behave exactly the same as the underlying database exceptions. See `PEP 249 - Python Database API Specification v2.0`_ for further information. diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt index 011d389c83..e689f0b1bc 100644 --- a/docs/ref/templates/builtins.txt +++ b/docs/ref/templates/builtins.txt @@ -572,7 +572,8 @@ You cannot check for equality with Python objects such as ``True`` or tag instead. .. versionadded:: 1.2 - An alternative to the ``ifequal`` tag is to use the :ttag:`if` tag and the ``==`` operator. + An alternative to the ``ifequal`` tag is to use the :ttag:`if` tag and the + ``==`` operator. .. templatetag:: ifnotequal @@ -582,7 +583,8 @@ ifnotequal Just like ``ifequal``, except it tests that the two arguments are not equal. .. versionadded:: 1.2 - An alternative to the ``ifnotequal`` tag is to use the :ttag:`if` tag and the ``!=`` operator. + An alternative to the ``ifnotequal`` tag is to use the :ttag:`if` tag and the + ``!=`` operator. .. templatetag:: include @@ -632,7 +634,8 @@ load Load a custom template tag set. -See :doc:`Custom tag and filter libraries ` for more information. +See :doc:`Custom tag and filter libraries ` for +more information. .. templatetag:: now @@ -905,8 +908,8 @@ refer to the name of the pattern in the ``url`` tag instead of using the path to the view. Note that if the URL you're reversing doesn't exist, you'll get an -:exc:`NoReverseMatch` exception raised, which will cause your site to display an -error page. +:exc:`~django.core.urlresolvers.NoReverseMatch` exception raised, which will +cause your site to display an error page. If you'd like to retrieve a URL without displaying it, you can use a slightly different call:: diff --git a/docs/topics/db/index.txt b/docs/topics/db/index.txt index c49f158e64..24a6202564 100644 --- a/docs/topics/db/index.txt +++ b/docs/topics/db/index.txt @@ -1,6 +1,8 @@ Models and databases ==================== +.. module:: django.db + A model is the single, definitive source of data about your data. It contains the essential fields and behaviors of the data you're storing. Generally, each model maps to a single database table.