I'm deploying a site using Wagtail CMS on a webfaction server. When I try to go to www.mysite.com/admin (wagatil admin interfase) it give me a 500 error. I can go to django's admin with no problem.
I looked at the server logs and what it says is the it raise a KeyError for the 'request' key. This happens only when Debug is True, I changed it to False and the /admin was rendered correctly.
I verified that the 'django.core.context_processors.request'
is added in the TEMPLATE_CONTEXT_PROCESSORS
setting.
here is the traceback from the server logs
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] mod_wsgi (pid=21360): Exception occurred processing WSGI script '/home/frodriguez/webapps/djblog/myproject/myproject/wsgi.py'.
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] Traceback (most recent call last):
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] File "/home/frodriguez/.virtualenvs/venv/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 206, in __call__
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] response = self.get_response(request)
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] File "/home/frodriguez/.virtualenvs/venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 194, in get_response
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] File "/home/frodriguez/.virtualenvs/venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 236, in handle_uncaught_exception
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] return callback(request, **param_dict)
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] File "/home/frodriguez/.virtualenvs/venv/lib/python2.7/site-packages/django/utils/decorators.py", line 99, in _wrapped_view
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] response = view_func(request, *args, **kwargs)
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] File "/home/frodriguez/.virtualenvs/venv/lib/python2.7/site-packages/django/views/defaults.py", line 46, in server_error
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] return http.HttpResponseServerError(template.render(Context({})))
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] File "/home/frodriguez/.virtualenvs/venv/lib/python2.7/site-packages/django/template/base.py", line 140, in render
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] return self._render(context)
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] File "/home/frodriguez/.virtualenvs/venv/lib/python2.7/site-packages/django/template/base.py", line 134, in _render
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] return self.nodelist.render(context)
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] File "/home/frodriguez/.virtualenvs/venv/lib/python2.7/site-packages/django/template/base.py", line 840, in render
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] bit = self.render_node(node, context)
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] File "/home/frodriguez/.virtualenvs/venv/lib/python2.7/site-packages/django/template/base.py", line 854, in render_node
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] return node.render(context)
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] File "/home/frodriguez/.virtualenvs/venv/lib/python2.7/site-packages/django/template/loader_tags.py", line 123, in render
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] return compiled_parent._render(context)
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] File "/home/frodriguez/.virtualenvs/venv/lib/python2.7/site-packages/django/template/base.py", line 134, in _render
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] return self.nodelist.render(context)
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] File "/home/frodriguez/.virtualenvs/venv/lib/python2.7/site-packages/django/template/base.py", line 840, in render
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] bit = self.render_node(node, context)
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] File "/home/frodriguez/.virtualenvs/venv/lib/python2.7/site-packages/django/template/base.py", line 854, in render_node
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] return node.render(context)
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] File "/home/frodriguez/.virtualenvs/venv/lib/python2.7/site-packages/django/template/base.py", line 1125, in render
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] return func(*resolved_args, **resolved_kwargs)
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] File "/home/frodriguez/.virtualenvs/venv/lib/python2.7/site-packages/wagtail/wagtailadmin/templatetags/wagtailuserbar.py", line 15, in wagtailuserbar
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] request = context['request']
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] File "/home/frodriguez/.virtualenvs/venv/lib/python2.7/site-packages/django/template/context.py", line 56, in __getitem__
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] raise KeyError(key)
[Fri Nov 07 15:33:58 2014] [error] [client 127.0.0.1] KeyError: 'request'
Does anyone know what am I missing?