2016-02-13 53 views
0

我是django的初學者,我從這裏學習。Django URLconf錯誤

http://www.madewithtea.com/simple-todo-api-with-django-and-oauth2.html

,當我跑我得到這個錯誤。

enter image description here

這是我的項目結構和代碼的URL路由。雖然我知道這是常見錯誤,但我不知道這一點。

enter image description here

我應如何解決呢?

+0

您正在請求根URL('/'),但您尚未爲其配置視圖。或者添加視圖(並添加'^ $'url模式),或者訪問有效的URL,例如http://127.0.0.1:8000/register/ –

回答

1

在您的url conf中沒有關於http://127.0.0.1:8000/的網址。您需要通過執行以下操作來定義該頁面的URL:

url(r'^$', name.of.the.view),