我在这里读了很多答案,但没有人回答我的确切问题.
我做了第一部分,民意调查.我开始第2部分,管理员,然而,在runserve之后,当我尝试访问页面时,这是我得到的错误(我的项目名称是john):
Page not found (404)
Request Method: GET
Request URL: http://127.0.0.1:8000/
Using the URLconf defined in john.urls, Django tried these URL patterns, in this order:
^admin/
The current URL, , didn't match any of these.
You're seeing this error because you have DEBUG = True in your Django settings file. ``
Run Code Online (Sandbox Code Playgroud)
我的代码 - urls.py:
from django.conf.urls import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# …Run Code Online (Sandbox Code Playgroud)