bsr*_*bsr 3 python django django-grappelli
我试图使用django-grappelli仪表板,管理界面给出了错误.
Django Version: 1.4.1
Exception Type: ImportError
Exception Value:
No module named dashboard
In template /.../lib/python2.7/site-packages/grappelli/dashboard/templates/admin/index.html, error at line 32
31 {% block content %}
32 {% grp_render_dashboard %}
33 {% endblock %}
Run Code Online (Sandbox Code Playgroud)
我可以在更改之前使用grappelli管理界面.采取的步骤是根据手册.我将这些添加到我的settings.py中
GRAPPELLI_INDEX_DASHBOARD = 'myproj.dashboard.CustomIndexDashboard'
...
TEMPLATE_CONTEXT_PROCESSORS = (
"django.contrib.auth.context_processors.auth",
"django.core.context_processors.request",
"django.core.context_processors.i18n",
'django.contrib.messages.context_processors.messages',
)
INSTALLED_APPS = (
'grappelli.dashboard',
'grappelli',
'django.contrib.admin',
...
Run Code Online (Sandbox Code Playgroud)
dashboard.py位于根目录(myproj)中.它里面有一堂课.
class CustomIndexDashboard(Dashboard):
myproj
??? admin
? ??? css
:
??? dashboard.py
??? grappelli
? ??? images
? ? ??? backgrounds
??? myapp
? ??? __init__.py
? ??? __init__.pyc
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3235 次 |
| 最近记录: |