Django 1.9. Everything seems to be set up properly. I was having some
issues with my templates but got them working. I didn't touch any admin or
even any login stuff. Though my template does have a {% csrf_token %}.
I can't imagine how this happened.
>From Googling it seems like it was a
packages/django/contrib/auth/
decorators.py", line 66, in __call__
if self.test_func(request.user):
AttributeError: 'WSGIRequest' object has no attribute 'user'
Any ideas why this would occur? It doesn't happen all the time.
We'
I had this error because i'm not using the auth module.
If that's you case, comment it out in your settings.py file:
TEMPLATE_CONTEXT_PROCESSORS = (
"django.core.context_processors.debug",
"django.core.context_processors.i18n",
# "django.core.context_processors.auth",
)
On Jan 5, 5
It would seem that something is happening between the authentication
middleware setting request.__class__.user and the context processor
reading it.
Couple things to try if you're in a debugging mood:
After line 11 in django/contrib/admin/middleware.py:
request.__class__.user = LazyUser()
+
On 10/18/06, Tyson Tate <[EMAIL PROTECTED]> wrote:
...
I've got the following in settings.py:
TEMPLATE_CONTEXT_PROCESSORS = (
"django.core.context_processors.debug",
"django.core.context_processors.i18n",
"django.core.context_processors.auth",
)
MIDDLEWARE_CLASSES = (
'djan
context_processors)
File "/home/ohgoditb/django_src/django/template/context.py", line
97, in __init__
self.update(processor(request))
File "/home/ohgoditb/django_src/django/core/
context_processors.py", line 17, in auth
return {
AttributeError: 'WSGIReques
6 matches
Mail list logo