﻿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
7041	mistake in documentation - 'url_dispatch'	andy baxter	nobody	"I think there is a mistake in the documentation about writing named url patterns.

This example is included on the page: 
http://www.djangoproject.com/documentation/url_dispatch/#naming-url-patterns

{{{
urlpatterns = patterns('',
    url(r'/archive/(\d{4})/$', archive, name=""full-archive""),
    url(r'/archive-summary/(\d{4})/$', archive, {'summary': True}, ""arch-summary""),
)
}}}

Note that this shows two different ways of attaching a name to an url. The second way works, but not the first. Also, it would probably help if you told people that where there are no parameters to the view, you need to pass an empty dictionary in urlpatterns before giving the url name. E.g.:

{{{
urlpatterns = patterns('',
    url(r'/archive/(\d{4})/$', archive, {}, ""full-archive""),
    url(r'/archive-summary/(\d{4})/$', archive, {'summary': True}, ""arch-summary""),
)
}}}"		closed	Documentation	dev		worksforme			Unreviewed	0	0	0	0	0	0
