Opened 18 years ago

Closed 17 years ago

#2833 closed defect (duplicate)

Request.context tries to access user when there's no session causing traceback

Reported by: Filipe Owned by: nobody
Component: Core (Other) Version: dev
Severity: normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When using django without a database one will have to explicitly include TEMPLATE_CONTEXT_PROCESSORS in settings.py (as a workaround) in order to remove 'django.core.context_processors.auth'. Otherwise, when having DEBUG=False in settings.py, tracebacks will be displayed whenever HTTP 404s happen, instead of the expected 404.html template.

Please refer to this thread:
http://groups.google.com/group/django-users/browse_frm/thread/2dc05239c27c8a06/b640aa4f26f2d434

Attachments (2)

auth_context_processors_fix.diff (469 bytes ) - added by deepak <deep.thukral@…> 17 years ago.
auth_context_processors_fix.2.diff (484 bytes ) - added by deepak <deep.thukral@…> 17 years ago.
from toplevel

Download all attachments as: .zip

Change History (6)

comment:1 by mir@…, 18 years ago

Component: Admin interfaceCore framework

corrected component

comment:2 by Simon G. <dev@…>, 17 years ago

Summary: Context_processors.auth when there's no sessionRequest.context tries to access user when there's no session causing traceback
Triage Stage: UnreviewedAccepted

Malcolm Tredinnick's explanation:

OK, this is the problem line: RequestContext tries to access "user". The
reason we are using RequestContext is because of ticket #688 (which is
quite a reasonable change). However, we have to conditionally avoid this
user requirement. 

by deepak <deep.thukral@…>, 17 years ago

comment:3 by deepak <deep.thukral@…>, 17 years ago

Has patch: set
Needs tests: set
Version: SVN

If request doesnt have user attribute then it returns empty dictionary.

by deepak <deep.thukral@…>, 17 years ago

from toplevel

comment:4 by James Bennett, 17 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #4049.

Note: See TracTickets for help on using tickets.
Back to Top