Skip to content

Commit

Permalink
Only propagate callables from resolver.reverse_dict to parents, rathe…
Browse files Browse the repository at this point in the history
…r than everything.
  • Loading branch information
bradleyayers committed Jun 26, 2012
1 parent 6e845ea commit 079e93e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions django/core/urlresolvers.py
Expand Up @@ -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.
Expand Down

0 comments on commit 079e93e

Please sign in to comment.