1

Django 管理パネルを django-fluent-dashbaord と統合しようとしているので、ドキュメントの指示に従います: https://django-fluent-dashboard.readthedocs.org/en/latest/installation.html

その後、管理パネルを起動しようとするとエラーが発生します:

KeyError at /admin/
'request'
Request Method: GET
Request URL:    http://localhost:8000/admin/
Django Version: 1.5.1
Exception Type: KeyError
Exception Value:    
'request'
Exception Location: C:\Users\Grzegorz\Documents\VEnvs\XXX\lib\site-packages\django\template\context.py in __getitem__, line 57
Python Executable:  C:\Users\Grzegorz\Documents\VEnvs\XXX\Scripts\python.exe
Python Version: 2.7.3

...

テンプレートのレンダリング中にエラーが発生しました

In template C:\Users\Grzegorz\Documents\VEnvs\XXX\lib\site-packages\admin_tools\menu\templates\admin\base_site.html, error at line 22
request
12  {% endif %}
13  {% endblock %}
14  
15  {% block branding %}
16  <h1 id="site-name">{% trans 'Django administration' %}</h1>
17  {% endblock %}
18  
19  {% block nav-global %}
20  {% if user.is_active and user.is_staff %}
21  {% if not is_popup %}
22  {% admin_tools_render_menu %}
23  {% endif %}
24  {% endif %}
25  {% endblock %}
26  

この問題の原因となる可能性のある提案はありますか?

4

2 に答える 2

1

「TEMPLATE_CONTEXT_PROCESSORS」に「django.core.context_processors.request」を追加するのを忘れたときに、django-admin-tool で同様の問題が発生しました。

于 2013-08-13T15:09:20.217 に答える