基本上我一直在关注这个教程,但是当涉及到使管理页面工作时我很困惑.我得到的错误是:在此服务器上找不到请求的URL/admin /.所以我看了很多论坛和相当多的stackoverflow问题,但由于我是一个完整的菜鸟我不明白他们中的一半,而另一半的解决方案并没有解决我的问题.这就是我的settings.py看起来像:
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'
)
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('',
# 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)),
)
Run Code Online (Sandbox Code Playgroud)
任何帮助都感激不尽.提前致谢!
当你到http:// 127 0 0 1:8000时,你有没有得到"欢迎来到Django"页面?(带点)
你要去http:// 127 0 0 1:8000/admin /?
教程第一部分的所有内容都有效吗?你看到数据库中的项目了吗?
在下面的评论中,我们认为问题不在于Django,因为他有完全相同的代码(我的工作).他必须去wiki.bitnami.org/Components/Django并按照其中的说明进行操作
| 归档时间: |
|
| 查看次数: |
7406 次 |
| 最近记录: |