The ticket page is here: https://code.djangoproject.com/ticket/16774
I previously said people trying to resolve URLs in their code may have
difficulty because the DoesNotResolve exception is not raised until the
view is run. Just now I thought how it would be done. I think changing
resolver.url_patterns to return an iterator to a generator maybe the way to
go?
resolver = urlresolvers.RegexURLResolver(r'^/', urlconf)
url_patterns = (pattern for pattern in resolver.url_patterns)
resolver = urlresolvers.RegexURLResolver(r'^/', url_patterns)
while response is None:
callback, callback_args, callback_kwargs = resolver.resolve(
request.path_info)
try:
response = callback(request, *callback_args, **callback_kwargs)
except urlresolvers.DoesNotResolve:
# Continue resolve URLs if the view raises
# urlresolvers.DoesNotResolve exception to indicate
# the url pattern does not match.
continue
--
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/django-developers/-/Gdj2EW8P65sJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-developers?hl=en.