On Jun 10, 6:30 pm, albert kao <albertk...@gmail.com> 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 django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.