summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJustin Bronn <jbronn@gmail.com>2008-06-04 17:37:02 +0000
committerJustin Bronn <jbronn@gmail.com>2008-06-04 17:37:02 +0000
commita245b72d67376a7c287ff419773c9e3fb2bcf4ed (patch)
tree8d74446e967179ae72cecd834c9e693e4cfb1a1a /docs
parentb4a687b18921a975b18b194d124844c80f5d8f39 (diff)
gis: Merged revisions 7545-7546,7548-7561,7563-7565,7567-7569 via svnmerge from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@7573 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/db-api.txt7
-rw-r--r--docs/flatpages.txt11
-rw-r--r--docs/serialization.txt2
-rw-r--r--docs/url_dispatch.txt4
4 files changed, 20 insertions, 4 deletions
diff --git a/docs/db-api.txt b/docs/db-api.txt
index 405ed87cef..a15c45d37b 100644
--- a/docs/db-api.txt
+++ b/docs/db-api.txt
@@ -1061,7 +1061,12 @@ they query the database each time they're called.
Returns the object matching the given lookup parameters, which should be in
the format described in `Field lookups`_.
-``get()`` raises ``AssertionError`` if more than one object was found.
+``get()`` raises ``MultipleObjectsReturned`` if more than one object was found.
+The ``MultipleObjectsReturned`` exception is an attribute of the model class.
+For example, the following will raise ``MultipleObjectsReturned`` if there
+are more than one authors with the name of 'John'::
+
+ Author.objects.get(name='John') # raises Author.MultipleObjectsReturned
``get()`` raises a ``DoesNotExist`` exception if an object wasn't found for the
given parameters. The ``DoesNotExist`` exception is an attribute of the model
diff --git a/docs/flatpages.txt b/docs/flatpages.txt
index b6fa8e035f..a538217642 100644
--- a/docs/flatpages.txt
+++ b/docs/flatpages.txt
@@ -66,6 +66,17 @@ resort.
For more on middleware, read the `middleware docs`_.
+.. admonition:: Ensure that your 404 template works
+
+ Note that the ``FlatpageFallbackMiddleware`` only steps in once
+ another view has successfully produced a 404 response. If another
+ view or middleware class attempts to produce a 404 but ends up
+ raising an exception instead (such as a ``TemplateDoesNotExist``
+ exception if your site does not have an appropriate template to
+ use for HTTP 404 responses), the response will become an HTTP 500
+ ("Internal Server Error") and the ``FlatpageFallbackMiddleware``
+ will not attempt to serve a flat page.
+
.. _SITE_ID: ../settings/#site-id
.. _RequestContext: ../templates_python/#subclassing-context-djangocontext
.. _middleware docs: ../middleware/
diff --git a/docs/serialization.txt b/docs/serialization.txt
index e901410f1c..8a672d8b8a 100644
--- a/docs/serialization.txt
+++ b/docs/serialization.txt
@@ -112,7 +112,7 @@ Django "ships" with a few included serializers:
strings, etc.). Not really all that useful on its own, but
used as a base for other serializers.
- ``yaml`` Serializes to YAML (Yet Another Markup Lanuage). This
+ ``yaml`` Serializes to YAML (YAML Ain't a Markup Language). This
serializer is only available if PyYAML_ is installed.
========== ==============================================================
diff --git a/docs/url_dispatch.txt b/docs/url_dispatch.txt
index 28f15289a9..7d67cd5b53 100644
--- a/docs/url_dispatch.txt
+++ b/docs/url_dispatch.txt
@@ -157,10 +157,10 @@ The URLconf searches against the requested URL, as a normal Python string. This
does not include GET or POST parameters, or the domain name.
For example, in a request to ``http://www.example.com/myapp/``, the URLconf
-will look for ``/myapp/``.
+will look for ``myapp/``.
In a request to ``http://www.example.com/myapp/?page=3``, the URLconf will look
-for ``/myapp/``.
+for ``myapp/``.
The URLconf doesn't look at the request method. In other words, all request
methods -- ``POST``, ``GET``, ``HEAD``, etc. -- will be routed to the same