Looks like you haven't created any polls yet, at least not one with an
ID of 5. Go into the admin section described in part 2 of the tutorial
and make a few polls. Once you've create some you should see polls of
IDs 1,2,3 etc show up and the URLs should start to work.

Dan Harris
[email protected]

On Jun 10, 10:09 pm, albert kao <[email protected]> wrote:
> On Jun 10, 6:30 pm, albert kao <[email protected]> wrote:
>
>
>
>
>
> > I try the "Writing your first Django app tutorial, part 3" (http://
> > docs.djangoproject.com/en/dev/intro/tutorial03/#intro-tutorial03) with
> > Django-1.2.1.
> > I have got a Page not found (404) when modifying the urls.py described
> > in the "Decoupling the URLconfs" section:
> > Request Method:         GET
> > Request URL:    http://127.0.0.1:8000/polls/results
>
> > mysite/urls.py is:
> > from django.conf.urls.defaults import *
>
> > # Uncomment the next two lines to enable the admin:
> > from django.contrib import admin
> > admin.autodiscover()
>
> > urlpatterns = patterns('',
> >     (r'^polls/', include('mysite.polls.urls')),
> >     (r'^admin/', include(admin.site.urls)),
> > )
>
> > mysite/polls/urls.py is:
> > from django.conf.urls.defaults import *
>
> > # Uncomment the next two lines to enable the admin:
> > from django.contrib import admin
> > admin.autodiscover()
>
> > urlpatterns = patterns('mysite.polls.views',
> >     (r'^$', 'index'),
> >     (r'^(?P<poll_id>\d+)/$', 'detail'),
> >     (r'^(?P<poll_id>\d+)/results/$', 'results'),
> >     (r'^(?P<poll_id>\d+)/vote/$', 'vote'),
> > )
>
> http://localhost:8000/polls/5/display the following error:
> Page not found (404)
> Request Method:         GET
> Request URL:    http://localhost:8000/polls/5/
>
> No Poll matches the given query.
> You're seeing this error because you have DEBUG = True in your Django
> settings file. Change that to False, and Django will display a
> standard 404 page.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to