Django不显示管理页面,只显示模板

时间:2012-04-18 23:03:24

标签: python django django-admin

所以我正在使用Django框架创建我的第一个网站,但是我目前面临的问题是无法访问管理页面,它显示的所有内容都是我定义的模板。我不确定我应该发布什么代码,所以一旦发布建议,我将更新此问题。提前感谢您的回复。

这是我的网址文件:

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'^$', 'blog.views.home', name='home'),
    # url(r'^blog/', include('blog.foo.urls')),
    url(r'^blog/','blog.views.index'), #THIS IS MY ADDED CODE

    # 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)),
)

0 个答案:

没有答案
相关问题