On Mon, Jan 3, 2011 at 4:36 PM, Stephen Waterbury <
stephen.c.waterb...@nasa.gov> wrote:

> I posted the traceback I'm getting -- http://dpaste.com/293813/
> I'm still completely mystified.  The traceback directs me to:
> "Edit your MIDDLEWARE_CLASSES setting to insert
> 'django.contrib.auth.middleware.AuthenticationMiddleware'
> before the RemoteUserMiddleware class."  But looking further
> up in the traceback, it sees that d.c.a.m.AuthenticationMiddleware
> *is* there, and it's true -- I already have it in my
> MIDDLEWARE_CLASSES setting before the RemoteUserMiddleware class,
> so how could mod_wsgi possibly not be finding it?
>

The code issuing this message here is guessing about the cause of the real
problem it has run into, which is that the request object it has been handed
has no user attribute. The most likely reason for no user attribute on the
request at this point is missing AuthenticationMiddleware, but if
AuthenticationMiddleware is in place then there must be something else
causing the problem.

I happened to just stumble across one of these other possible problems: some
other error in the project code. In my case I had a model with a method with
a @Property decorator applied (leftover deliberate error to see what message
that would generate -- should be @property). With that error in place,
adding RemoteUserMiddleware to my config and trying to access the site via
apache/mod_wsgi produced the error message you are seeing. The real error
was obvious when I tried running the dev server, which would not even start
properly with that error in place. Also, removing the RemoteUserMiddleware
from the settings and accessing the site via apache/mod_wsgi showed the true
error. Once I removed the erroneous @Property decorator, the
RemoteUserMiddleware error went away.

I'm not sure why this RemoteUserMiddleware error is having the effect of
hiding other errors, and don't have time to dig into that right now. But one
possible way to figure out what is going on in your case would be to try
removing that middleware and seeing if some other error is reported.

Karen
-- 
http://tracey.org/kmt/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to