joashivanmoodley / django-pagination

Automatically exported from code.google.com/p/django-pagination
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Caught an exception while rendering: u'user' #59

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. TEMPLATE_CONTEXT_PROCESSORS
2. 'django.core.context_processors.request',
3.

What is the expected output? What do you see instead?
Django Admin dont work, i cant go into

What version of the product are you using? On what operating system?
Django-pagination 1.0.5, Linux, Django 1.1

Please provide any additional information below.

TemplateSyntaxError at /admin/

Caught an exception while rendering: u'user'

Original Traceback (most recent call last):
  File "/home/user/webapps/django/lib/python2.5/django/template/debug.py", line 71, 
in render_node
    result = node.render(context)
  File 
"/home/user/webapps/django/lib/python2.5/django/contrib/admin/templatetags/log.p
y", 
line 19, in render
    user_id = context[self.user].id
  File "/home/pasoapaso/webapps/django/lib/python2.5/django/template/context.py", 
line 44, in __getitem__
    raise KeyError(key)
KeyError: u'user'

Original issue reported on code.google.com by j.calc...@gmail.com on 20 Sep 2009 at 3:46

GoogleCodeExporter commented 8 years ago
This is not a bug. It's misconfiguration. When you use 
TEMPLATE_CONTEXT_PROCESSORS with above syntax, 
u're removing the defaults processors. Anyways, I got the same issue today and 
the solution is:

TEMPLATE_CONTEXT_PROCESSORS = ( 
    "django.core.context_processors.auth", 
    "django.core.context_processors.debug", 
    "django.core.context_processors.i18n", 
    "django.core.context_processors.media", 
    "django.core.context_processors.request", 
) 

Best,
Isa

Original comment by isago...@gmail.com on 1 Nov 2009 at 11:13