1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +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:
Malcolm Tredinnick
2008-09-27 06:14:11 +00:00
parent 6c7cf34d69
commit 15b0158e39
4 changed files with 45 additions and 19 deletions

View File

@@ -1,5 +1,5 @@
from django.conf.urls.defaults import *
from views import empty_view
from views import empty_view, absolute_kwargs_view
urlpatterns = patterns('',
url(r'^places/(\d+)/$', empty_view, name='places'),
@@ -45,4 +45,11 @@ urlpatterns = patterns('',
# This is non-reversible, but we shouldn't blow up when parsing it.
url(r'^(?:foo|bar)(\w+)/$', empty_view, name="disjunction"),
# Regression views for #9038. See tests for more details
url(r'arg_view/$', 'kwargs_view'),
url(r'arg_view/(?P<arg1>\d+)/$', 'kwargs_view'),
url(r'absolute_arg_view/(?P<arg1>\d+)/$', absolute_kwargs_view),
url(r'absolute_arg_view/$', absolute_kwargs_view),
)