Fixed #11959 -- Updated the tutorial to ensure that the admin site continues to work after URLpatterns are introduced. Thanks to carljm for the report and draft patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@11621 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2009-10-14 13:38:31 +00:00
parent b30cba4e2b
commit f14833ee67
4 changed files with 24 additions and 14 deletions

View file

@ -52,10 +52,11 @@ created a URLconf for the polls application that includes this line::
(r'^(?P<poll_id>\d+)/vote/$', 'vote'),
So let's create a ``vote()`` function in ``mysite/polls/views.py``::
We also created a dummy implementation of the ``vote()`` function. Let's
create a real version. Add the following to ``mysite/polls/views.py``::
from django.shortcuts import get_object_or_404, render_to_response
from django.http import HttpResponseRedirect
from django.http import HttpResponseRedirect, HttpResponse
from django.core.urlresolvers import reverse
from mysite.polls.models import Choice, Poll
# ...