#14259: URL dispatcher does not reject duplicate URL names
----------------------------+-----------------------------------------------
Reporter: tobias | Owner: nobody
Status: new | Milestone: 1.3
Component: Core framework | Version: 1.2
Keywords: | Stage: Unreviewed
Has_patch: 0 |
----------------------------+-----------------------------------------------
It's possible to construct a urls.py with duplicate URL names, and Django
just returns the last URL registered with that name when doing reverse().
Django should probably raise an exception so you know that there's an
issue with your urls.py and/or an incompatibility between apps.
e.g., when you add this to your urls.py file:
{{{
urlpatterns = patterns('views',
url(r'^1/$', 'view', name='myname'),
url(r'^2/$', 'view', name='myname'),
)
}}}
reverse() returns /2/ and not /1/.
--
Ticket URL: <http://code.djangoproject.com/ticket/14259>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
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-updates?hl=en.