﻿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
9915	"Docs for ""Naming URL patterns"""	rmichael	nobody	"In the short section ""Naming URL patterns"", [http://docs.djangoproject.com/en/dev/topics/http/urls/#id2 here], the example is re-written as

{{{
urlpatterns = patterns('',
    url(r'^archive/(\d{4})/$', archive, name=""full-archive""),
    url(r'^archive-summary/(\d{4})/$', archive, {'summary': True}, ""arch-summary""),
)
}}}

Assuming I've understood correctly, I think it would be clearer if the second url() call also explicitly used the ""name="" parameter, and also provided the extra dictionary of options as the final argument (for consistency with the earlier discussion on the same page).  E.g.

{{{
urlpatterns = patterns('',
    url(r'^archive/(\d{4})/$', archive, name=""full-archive""),
    url(r'^archive-summary/(\d{4})/$', archive, name=""arch-summary"", {'summary': True}),
)
}}}

(In fact, I'm not sure it's correct if written without the named parameter ""name"", e.g. without ""name=..."".)

If it's fine, and I have misunderstood, it would be nice if the documentation mentioned a short-hand is being used in the second url() call to eliminate my misunderstanding. :)

Excellent docs in general, thanks!

"		closed	Documentation	1.0		wontfix			Unreviewed	0	0	0	0	0	0
