1. David Jean Louis
  2. django-admin-tools
Issue #111 invalid

KeyError at /admin/

Dominik Kozaczko
created an issue

Django 1.4

After installing django-admin-tools (all exactly with documentation) and pointing my browser to testserver's /admin/ I get this error.

Here's the traceback:

{{{ Environment:

Request Method: GET Request URL: http://127.0.0.1:8000/admin/

Django Version: 1.4 Python Version: 2.7.3 Installed Applications: ('admin_tools', 'admin_tools.theming', 'admin_tools.menu', 'admin_tools.dashboard', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.admin', 'django_extensions', 'south') Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware')

Template error: In template /usr/lib/python2.7/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 :

Traceback: File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response 136. response = response.render() File "/usr/lib/python2.7/site-packages/django/template/response.py" in render 104. self._set_content(self.rendered_content) File "/usr/lib/python2.7/site-packages/django/template/response.py" in rendered_content 81. content = template.render(context) File "/usr/lib/python2.7/site-packages/django/template/base.py" in render 140. return self._render(context) File "/usr/lib/python2.7/site-packages/django/template/base.py" in _render 134. return self.nodelist.render(context) File "/usr/lib/python2.7/site-packages/django/template/base.py" in render 823. bit = self.render_node(node, context) File "/usr/lib/python2.7/site-packages/django/template/debug.py" in render_node 74. return node.render(context) File "/usr/lib/python2.7/site-packages/django/template/loader_tags.py" in render 123. return compiled_parent._render(context) File "/usr/lib/python2.7/site-packages/django/template/base.py" in _render 134. return self.nodelist.render(context) File "/usr/lib/python2.7/site-packages/django/template/base.py" in render 823. bit = self.render_node(node, context) File "/usr/lib/python2.7/site-packages/django/template/debug.py" in render_node 74. return node.render(context) File "/usr/lib/python2.7/site-packages/django/template/loader_tags.py" in render 123. return compiled_parent._render(context) File "/usr/lib/python2.7/site-packages/django/template/base.py" in _render 134. return self.nodelist.render(context) File "/usr/lib/python2.7/site-packages/django/template/base.py" in render 823. bit = self.render_node(node, context) File "/usr/lib/python2.7/site-packages/django/template/debug.py" in render_node 74. return node.render(context) File "/usr/lib/python2.7/site-packages/django/template/defaulttags.py" in render 281. return nodelist.render(context) File "/usr/lib/python2.7/site-packages/django/template/base.py" in render 823. bit = self.render_node(node, context) File "/usr/lib/python2.7/site-packages/django/template/debug.py" in render_node 74. return node.render(context) File "/usr/lib/python2.7/site-packages/django/template/loader_tags.py" in render 62. result = block.nodelist.render(context) File "/usr/lib/python2.7/site-packages/django/template/base.py" in render 823. bit = self.render_node(node, context) File "/usr/lib/python2.7/site-packages/django/template/debug.py" in render_node 74. return node.render(context) File "/usr/lib/python2.7/site-packages/django/template/defaulttags.py" in render 281. return nodelist.render(context) File "/usr/lib/python2.7/site-packages/django/template/base.py" in render 823. bit = self.render_node(node, context) File "/usr/lib/python2.7/site-packages/django/template/debug.py" in render_node 74. return node.render(context) File "/usr/lib/python2.7/site-packages/django/template/defaulttags.py" in render 281. return nodelist.render(context) File "/usr/lib/python2.7/site-packages/django/template/base.py" in render 823. bit = self.render_node(node, context) File "/usr/lib/python2.7/site-packages/django/template/debug.py" in render_node 74. return node.render(context) File "/usr/lib/python2.7/site-packages/django/template/base.py" in render 1178. _dict = func(resolved_args, *resolved_kwargs) File "/usr/lib/python2.7/site-packages/admin_tools/menu/templatetags/admin_tools_menu_tags.py" in admin_tools_render_menu 36. url = context['request'].get_full_path() File "/usr/lib/python2.7/site-packages/django/template/context.py" in getitem 54. raise KeyError(key)

Exception Type: KeyError at /admin/ Exception Value: 'request'

}}}

Comments (4)

  1. Log in to comment