#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)
Change History (6)
comment:1 by , 16 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:2 by , 16 years ago
by , 16 years ago
| Attachment: | 12575.diff added |
|---|
patch with docs and fixed tests (to reflect api changes)
comment:3 by , 16 years ago
| Has patch: | set |
|---|---|
| Triage Stage: | Unreviewed → Ready for checkin |
Note:
See TracTickets
for help on using tickets.
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
levelproperty)