mirror of
https://github.com/django/django.git
synced 2025-12-10 03:10:10 +00:00
Fixed #14200 -- Added a fallback if HttpRequest.urlconf is None.
Made BaseHandler fall back to settings.ROOT_URLCONF if HttpRequest.urlconf is set to None, rather than raising ImproperlyConfigured.
This commit is contained in:
parent
74402a5b0d
commit
738c0de300
5 changed files with 28 additions and 6 deletions
|
|
@ -184,6 +184,14 @@ All attributes should be considered read-only, unless stated otherwise below.
|
|||
URLconf for the current request, overriding the :setting:`ROOT_URLCONF`
|
||||
setting. See :ref:`how-django-processes-a-request` for details.
|
||||
|
||||
``urlconf`` can be set to ``None`` to revert any changes made by previous
|
||||
middleware and return to using the :setting:`ROOT_URLCONF`.
|
||||
|
||||
.. versionchanged:: 1.9
|
||||
|
||||
Setting ``urlconf=None`` raised
|
||||
:exc:`~django.core.exceptions.ImproperlyConfigured` in older versions.
|
||||
|
||||
.. attribute:: HttpRequest.resolver_match
|
||||
|
||||
An instance of :class:`~django.core.urlresolvers.ResolverMatch` representing
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue