[1.7.x] Fixed #22486 -- Restored the ability to reverse views created using functools.partial.

Regression in 8b93b31487.

Thanks rcoup for the report.

Backport of 3c06b2f2a3 from master
This commit is contained in:
Tim Graham 2014-04-23 08:49:12 -04:00
parent c3228ef3e2
commit e192f13103
7 changed files with 53 additions and 1 deletions

View file

@ -1,6 +1,6 @@
from django.conf.urls import patterns, url, include
from .views import empty_view, absolute_kwargs_view
from .views import empty_view, empty_view_partial, empty_view_wrapped, absolute_kwargs_view
other_patterns = patterns('',
@ -51,6 +51,10 @@ urlpatterns = patterns('',
# This is non-reversible, but we shouldn't blow up when parsing it.
url(r'^(?:foo|bar)(\w+)/$', empty_view, name="disjunction"),
# Partials should be fine.
url(r'^partial/', empty_view_partial, name="partial"),
url(r'^partial_wrapped/', empty_view_wrapped, name="partial_wrapped"),
# Regression views for #9038. See tests for more details
url(r'arg_view/$', 'kwargs_view'),
url(r'arg_view/(?P<arg1>\d+)/$', 'kwargs_view'),