2014-02-26 67 views

回答

0

該頁是404 page not found。這表明您沒有正確配置您的網址或缺少網址。

/project/urls.py

urlpatterns = patterns('', 
    url(r'^polls/', include('polls.urls')), 
) 

其中所描述的polls.urls點使你的應用的網址在/polls/urls.py

所以,現在在你的調查/ url.py添加索引。

from django.conf.urls import patterns, url 

from polls import views 

urlpatterns = patterns('', 
    url(r'^$', views.index, name='index') 
) 

https://docs.djangoproject.com/en/1.6/intro/tutorial03/#write-your-first-view