mirror of
https://github.com/django/django.git
synced 2025-07-24 05:36:15 +00:00
Fixed #10326: handler500 and handler404 may now be callables. Thanks, dcwatson, adurdin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11854 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
125403ca97
commit
1c5fe467bd
5 changed files with 51 additions and 8 deletions
|
@ -253,24 +253,30 @@ handler404
|
|||
|
||||
.. data:: handler404
|
||||
|
||||
A string representing the full Python import path to the view that should be
|
||||
called if none of the URL patterns match.
|
||||
A callable, or a string representing the full Python import path to the view
|
||||
that should be called if none of the URL patterns match.
|
||||
|
||||
By default, this is ``'django.views.defaults.page_not_found'``. That default
|
||||
value should suffice.
|
||||
|
||||
.. versionchanged:: 1.2
|
||||
Previous versions of Django only accepted strings representing import paths.
|
||||
|
||||
handler500
|
||||
----------
|
||||
|
||||
.. data:: handler500
|
||||
|
||||
A string representing the full Python import path to the view that should be
|
||||
called in case of server errors. Server errors happen when you have runtime
|
||||
errors in view code.
|
||||
A callable, or a string representing the full Python import path to the view
|
||||
that should be called in case of server errors. Server errors happen when you
|
||||
have runtime errors in view code.
|
||||
|
||||
By default, this is ``'django.views.defaults.server_error'``. That default
|
||||
value should suffice.
|
||||
|
||||
.. versionchanged:: 1.2
|
||||
Previous versions of Django only accepted strings representing import paths.
|
||||
|
||||
include
|
||||
-------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue