Skip to content
Browse files

Only propagate callables from resolver.reverse_dict to parents, rathe…

…r than everything.
  • Loading branch information...
1 parent 6e845ea commit 079e93e61834aff5662a23ebc7ee504152ebaaab @bradleyayers committed Jun 26, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 django/core/urlresolvers.py
View
7 django/core/urlresolvers.py
@@ -287,9 +287,10 @@ def _populate(self):
namespaces[namespace] = (p_pattern + prefix, sub_pattern)
for app_name, namespace_list in pattern.app_dict.items():
apps.setdefault(app_name, []).extend(namespace_list)
- # When no namespace is provided, *all* the patterns in the
- # included resolver should be available in this resolver.
- include_lookups = iter(pattern.reverse_dict)
+ # When no namespace is provided, *all* the callable
+ # patterns in the included resolver should be available in
+ # this resolver.
+ include_lookups = ifilter(callable, pattern.reverse_dict)
# Add each of the child lookups to this resolver, being careful
# to add appropriate URL and regex prefixes so reversing results
# are correct.

0 comments on commit 079e93e

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