基本上我一直在关注教程,但当我要让管理页面工作时,我被卡住了。 我得到的错误是:在此服务器上找不到请求的URL/admin /。 所以我看了很多论坛和一些stackoverflow的问题,但因为我是一个完整的noob我不明白其中一半,另一半的解决方案不能解决我的问题。 这是我的settings.py是什么样子:Django管理页面没有找到
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
# Uncomment the next line to enable the admin:
'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
'django.contrib.admindocs',
'polls'
)
这是我的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('',
# Examples:
# url(r'^$', 'BoE.views.home', name='home'),
# url(r'^BoE/', include('BoE.foo.urls')),
# Uncomment the admin/doc line below to enable admin documentation:
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Uncomment the next line to enable the admin:
url(r'^admin/', include(admin.site.urls)),
)
任何帮助将非常感激。提前致谢!
该错误听起来不像Django错误。你正在使用'runserver'开发服务器,还是像Apache这样的真正的网络服务器?如果是后者,你很可能没有在Django实例和Apache之间建立wsgi连接,或者没有正确设置。一般来说,如果你在开发中,一个完整的web服务器只是一个令人头疼的问题,我会对任何以这种方式开始的教程保持警惕。 – 2012-07-20 16:11:40
嗨克里斯,我正在使用该教程建议的runserver开发服务器 – AmirHBP 2012-07-20 16:15:45
是否是django黄页错误 – 2012-07-20 16:26:41