﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
27367	Document behaviour when several urls have the same name	Christoph Schindler	Robert Roskam	"Currently -- as far as i can tell -- it is no problem to give the same name to different urls and then reverse them:

{{{
    url(r'^spam/$', 'myapp.views.index', name='myview'),
    url(r'^spam/(?P<ham>[\w-]+)/$', 'myapp.views.detail', name='myview'),
    url(r'^spam/(?P<ham>[\w-]+)/(?P<eggs>[\w-]+)/$', 'myapp.views.detail', name='myview'),
}}}

{{{
In [8]: reverse('myview', kwargs={'ham': 'foo', 'eggs': 'bar'})
Out[8]: u'/spam/foo/bar/'

In [9]: reverse('myview', kwargs={'ham': 'foo'})
Out[9]: u'/spam/foo/'

In [10]: reverse('myview')
Out[10]: u'/spam/'
}}}

But this is not documented and it is not clear, whether this is supported or unsupported behaviour.

It should either be stated clearly that url names should be unique /or/ that it is possible to ""overload"" url patterns by giving them the same name when they have a different number of arguments."	Cleanup/optimization	closed	Documentation	dev	Normal	fixed		reinout@…	Accepted	1	0	0	0	0	0
