According to your urlconf you should be going to a url like
http://127.0.0.1/polls/5/results where the "5" is the ID of the poll
you are looking at the results for. You are just missing the ID it
looks like.

See this: 
http://docs.djangoproject.com/en/1.2/intro/tutorial03/#write-your-first-view
part of the documentation for more.

Cheers,

Dan Harris
[email protected]

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'),
> )

-- 
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