diff options
| author | Georg Bauer <gb@hugo.westfalen.de> | 2005-10-16 16:17:48 +0000 |
|---|---|---|
| committer | Georg Bauer <gb@hugo.westfalen.de> | 2005-10-16 16:17:48 +0000 |
| commit | ed124dc0adddcd40154719403340f1871c641437 (patch) | |
| tree | 9b64eb75faf439e3febb85d3f9f04739fe802124 /docs | |
| parent | 6807c4bd4d209e055bd05e0518a5c86493b16bb3 (diff) | |
| parent | a2e26150b77cd2cdad4cc9de120a87a6370c6dd5 (diff) | |
i18n: merged to [885] in trunk
git-svn-id: http://code.djangoproject.com/svn/django/branches/i18n@886 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/middleware.txt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/middleware.txt b/docs/middleware.txt index dfa1947bbd..33cb1a38e4 100644 --- a/docs/middleware.txt +++ b/docs/middleware.txt @@ -168,6 +168,19 @@ object returned by a Django view. the given ``response``, or it could create and return a brand-new ``HttpResponse``. +process_exception +----------------- + +Interface: ``process_exception(self, request, exception)`` + +``request`` is an ``HttpRequest`` object. ``exception`` is an ``Exception`` +object raised by the view function. + +Django calls ``process_exception()`` when a view raises an exception. +``process_exception()`` should return either ``None`` or an ``HttpResponse`` +object. If it returns an ``HttpResponse`` object, the response will be returned +to the browser. Otherwise, default exception handling kicks in. + Guidelines ---------- |
