Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Changed reverse URL resolving to handle the case where an included fi…

…le does

not have a urlpatterns attribute.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit b8b9c95dcadbba3227606a7a7be41eab1370e8a4 1 parent 85f6f15
@malcolmt malcolmt authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/core/
2  django/core/
@@ -201,7 +201,7 @@ def __init__(self, regex, urlconf_name, default_kwargs=None):
self._reverse_dict = {}
def _get_reverse_dict(self):
- if not self._reverse_dict:
+ if not self._reverse_dict and hasattr(self.urlconf_module, 'urlpatterns'):
for pattern in reversed(self.urlconf_module.urlpatterns):
if isinstance(pattern, RegexURLResolver):
for key, value in pattern.reverse_dict.iteritems():

0 comments on commit b8b9c95

Please sign in to comment.
Something went wrong with that request. Please try again.