Opened 13 years ago
Last modified 13 years ago
#18089 closed Uncategorized
Django Tutorial -Part 3 — at Initial Version
Reported by: | prem | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 1.4 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Im new to Django and currently working on Part 3.
I tried the exact code as given in the tutorial but I get an error.
name main_page is not defined..when I run that page.
This is how my urls.py looks like,
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns(,
url(r'polls/$', 'polls.views.index'),
url(r'polls/(?P<poll_id>\d+)/$', 'polls.views.detail'),
url(r'polls/(?P<poll_id>\d+)/results/$', 'polls.views.results'),
url(r'polls/(?P<poll_id>\d+)/vote/$', 'polls.views.vote'),
url(r'admin/', include(admin.site.urls)),
)