On Sun, 2008-02-10 at 03:05 -0800, Hugh Bien wrote: > Hi, > > > I'm not using Django's built in auth application. When I go to a URL > that doesn't exist, I get this error: > > > AttributeError: 'WSGIRequest' object has no attribute 'user'
I suspect that the version of Django you're running is important here and you've just rediscovered ticket #4049 (fixed in r6356). However, a couple of your comments make me think you're making some bad assumptions, too, so a couple of potential clarifications follow (apologies in advance if you already know this)... > For some reason context_processors.auth is still being called, If context_processors.auth is in your TEMPLATE_CONTEXT_PROCESSORS list then it's going to be called. "Still being called" makes me wonder if you were hoping Django would automatically work out this processor wasn't needed. That would require one part of the code to know a lot more about earlier, completely separate parts of the request/response pipeline than is healthy (auth handling is done very early in the request processing, context processors are called, usually, late in views, just prior to rendering some output). > which tries to access auth.user. But the docstring for the > context_processors.auth suggests that it's only used for applications > that use Django's auth: It's still called in the normal context processor pipeline -- which means whenever a RequestContext object is created. So, you can either apply the patch from r6356 to your local code, or upgrade to trunk (probably the most extreme approach), or adjust the TEMPLATE_CONTEXT_PROCESSORS setting for your project (or use the approach you've already come up with, which isn't a bad idea, either). Regards, Malcolm -- The sooner you fall behind, the more time you'll have to catch up. http://www.pointy-stick.com/blog/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---