Opened 14 years ago

Closed 10 years ago

#14664 closed New feature (fixed)

MiddlewareNotUsed should display a warning

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

Description

MiddlewareNotUsed should display a warning.
Warning could contain middleware_path and user message if it's defined.

For example:

MiddlewareNotUsed("Online users middleware supports only database session engines."))

display:

MiddlewareWarning: users.middleware.OnlineUsers. Online users middleware supports only database session engines.

Change History (7)

comment:1 by dario, 14 years ago

when do you think it would be necessary?
It would log the message with DEBUG=TRUE or DEBUG=FALSE?

comment:2 by Julien Phalip, 14 years ago

Keywords: sprintdec2010 added
milestone: 1.3
Triage Stage: UnreviewedAccepted

This would be reasonable if DEBUG=True. This is a feature request, so removing from the 1.3 milestone which is now focused on bug fixing.

comment:3 by James Addison, 13 years ago

Severity: Normal
Type: New feature

comment:4 by Aymeric Augustin, 12 years ago

UI/UX: unset

Change UI/UX from NULL to False.

comment:5 by Aymeric Augustin, 12 years ago

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:6 by Berker Peksag, 10 years ago

Has patch: set
Version: 1.2master

I've logged a warning instead of adding a new warning class to be consistent with the rest of the file.

https://github.com/django/django/pull/3486

comment:7 by Tim Graham <timograham@…>, 10 years ago

Resolution: fixed
Status: newclosed

In 093e6c68b9b5afdf1f059a2321affc999763e919:

Fixed #14664 -- Logged a warning if MiddlewareNotUsed is raised in DEBUG mode.

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