﻿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
12971	Generic View Tutorial contains broken / incorrect syntax	quietlyconfident <dykema@…>	nobody	"The tutorial part 4 here: http://docs.djangoproject.com/en/dev/intro/tutorial04/#use-generic-views-less-code-is-better contains the following example (edited for brevity):
{{{
urlpatterns = patterns('',
    (r'^$', 'django.views.generic.list_detail.object_list', info_dict),
    ...
  )
}}}

Of note, the 2nd argument, django.views.generic.... , is quoted as if it were a string.  It's not and quoting it as such causes an error at runtime.  I'm not precisely sure how to submit a patch for documentation, but for all four of those examples, the 2nd argument shouldn't be quoted, it should look like this:

{{{
urlpatterns = patterns('',
    (r'^$', django.views.generic.list_detail.object_list, info_dict),
    ...
  )
}}}

And it would be even better IMHO if some of the fluff were taken out of that module name, by importing object_list and object detail from the proper module:

{{{
...

from django.views.generic.list_detail import object_list, object_detail

urlpatterns = patterns('',
    (r'^$', object_list, info_dict),
    ...
  )
}}}

This last one seems to be the most readable."		closed	Documentation	1.1		invalid	generic view tutorial		Unreviewed	0	0	0	0	0	0
