mirror of
https://github.com/django/django.git
synced 2025-10-26 07:06:08 +00:00
Fixed #9038 -- Correctly handle URL patterns with the same name (or view name),
declared independently and that differ only by argument signatures. Patch from Russell Keith-Magee. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9087 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -65,6 +65,17 @@ test_data = (
|
||||
('extra-places', '/e-places/10/', ['10'], {}),
|
||||
('extra-people', '/e-people/fred/', ['fred'], {}),
|
||||
('extra-people', '/e-people/fred/', [], {'name': 'fred'}),
|
||||
|
||||
# Regression for #9038
|
||||
# These views are resolved by method name. Each method is deployed twice -
|
||||
# once with an explicit argument, and once using the default value on
|
||||
# the method. This is potentially ambiguous, as you have to pick the
|
||||
# correct view for the arguments provided.
|
||||
('kwargs_view', '/arg_view/', [], {}),
|
||||
('kwargs_view', '/arg_view/10/', [], {'arg1':10}),
|
||||
('regressiontests.urlpatterns_reverse.views.absolute_kwargs_view', '/absolute_arg_view/', [], {}),
|
||||
('regressiontests.urlpatterns_reverse.views.absolute_kwargs_view', '/absolute_arg_view/10/', [], {'arg1':10}),
|
||||
|
||||
)
|
||||
|
||||
class URLPatternReverse(TestCase):
|
||||
|
||||
Reference in New Issue
Block a user