﻿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
19110	Tutorial Part 3 suggestion	pldiver@…	nobody	"In the Tutorial, part 3 when describing the url patterns and conf stuff, for the polls.views.detail ....

This is worth a review. When somebody requests a page from your Web site -- say, ""/polls/23/"", Django will load this Python module, because it's pointed to by the ROOT_URLCONF setting. It finds the variable named urlpatterns and traverses the regular expressions in order. When it finds a regular expression that matches -- r'^polls/(?P<poll_id>\d+)/$' -- it loads the function detail() from polls/views.py. Finally, it calls that detail() function like so:

detail(request=<HttpRequest object>, poll_id=''23')

The poll_id='23' part comes from (?P<poll_id>\d+). Using parentheses around a pattern ""captures"" the text matched by that pattern and sends it as an argument to the view function; the ?P<poll_id> defines the name that will be used to identify the matched pattern; and \d+ is a regular expression to match a sequence of digits (i.e., a number).

I suggest you change the poll_id to 1, 2, or 3 as this is what a user has setup in the tutorial previously.  poll_id = '23' will bring up the 404 code.

Not a big deal, but when just starting out, it is nice to see things work.

Patrick"	Uncategorized	closed	Documentation	1.4	Normal	wontfix			Unreviewed	0	0	0	0	1	0
