Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#12575 closed (fixed)

Create a better interface for getting/setting the effective level of contrib.messages

Reported by: Chris Beaven Owned by: Chris Beaven
Component: Contrib apps Version: dev
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

As Jeremy Dunck reported, the API to set the effective messaging level is awkward:

# Change the messages level to ensure the debug message is added. 
messages.get_messages(request).level = messages.DEBUG 

The general consensus seems to be having two methods called 'get_level' and 'set_level'.

Attachments (1)

12575.diff (7.1 KB ) - added by Chris Beaven 14 years ago.
patch with docs and fixed tests (to reflect api changes)

Download all attachments as: .zip

Change History (6)

comment:1 by Chris Beaven, 14 years ago

Owner: changed from nobody to Chris Beaven
Status: newassigned

comment:2 by Chris Beaven, 14 years ago

In fact, adding some tests I see that the current API is broken (since it's now proxied as a list, which doesn't have a level property)

by Chris Beaven, 14 years ago

Attachment: 12575.diff added

patch with docs and fixed tests (to reflect api changes)

comment:3 by Chris Beaven, 14 years ago

Has patch: set
Triage Stage: UnreviewedReady for checkin

comment:4 by Luke Plant, 14 years ago

Resolution: fixed
Status: assignedclosed

Fixed in [12207]

comment:5 by Jacob, 13 years ago

milestone: 1.2

Milestone 1.2 deleted

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