1

I'm trying to integrate my Django admin panel with django-fluent-dashbaord so I fallow instruction in documentation: https://django-fluent-dashboard.readthedocs.org/en/latest/installation.html

After that I try to launch my admin panel I get error:

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

...

Error during template rendering

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  

Do you have any suggestions what could be a reason of this problem?

vdboor
  • 21,914
  • 12
  • 83
  • 96
Gie
  • 1,907
  • 2
  • 24
  • 49

2 Answers2

1

I got similar problem in django-admin-tool when I forgot to add "django.core.context_processors.request" in "TEMPLATE_CONTEXT_PROCESSORS", Maybe it will give you some help

Dilraj
  • 2,791
  • 2
  • 15
  • 9
0

In my case this solved my problem

TEMPLATE_CONTEXT_PROCESSORS = ("django.core.context_processors.request","django.contrib.auth.context_processors.auth")

chiwangc
  • 3,566
  • 16
  • 26
  • 32
reg3x
  • 1
  • 2