我在尝试配置我的管理员 grappelli 时遇到错误。每当我的索引被注释掉时,管理页面都可以正常工作。但是当取消注释时,它会给我一个错误,在 /admin/ 处配置不当。那我应该如何配置管理员呢?
from django.conf.urls.defaults import *
from django.views.static import *
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/', include('apps.grappelli.urls')),
(r'^admin/', include(admin.site.urls)),
(r'^$', include('apps.index.views')),
# Examples:
#(r'^blog/', include('apps.blog.views')),
# Uncomment the admin/doc line below to enable admin documentation:
#(r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Uncomment the next line to enable the admin:
)
谢谢。