Opened 17 years ago

Closed 17 years ago

#7137 closed (invalid)

get_and_delete_messages is called in auth context processor for every request

Reported by: tangerine Owned by: nobody
Component: Core (Other) Version: dev
Severity: Keywords: context processor
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

user.get_and_delete_messages() is called irrespective of whether the request is for a page within the admin interface or not. Although it's typically only one extraneous query, it is extra overhead which is unnecessary for the vast majority of requests. Maybe it could be moved out in to a admin context processor which simply adds messages to the context?

Change History (1)

comment:1 by James Bennett, 17 years ago

Resolution: invalid
Status: newclosed

The messaging system is not an admin-specific feature; it is a general-purpose part of Django's authentication framework and is intended for use in any code which needs the ability to display such messages to a user (see, for example, its use in the views in django.views.generic.create_update).

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