#21935 closed New feature (wontfix)
Add the object to data used for the message
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | contrib.messages | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
It would be interesting to add the object into the cleaned_data dictionary to allow displaying a success message with some values taken from the object's attributes.
Attachments (1)
Change History (3)
by , 11 years ago
Attachment: | 0001-Add-theobjecttodatausedforthemessage.patch added |
---|
comment:1 by , 11 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
From the docs: "For ModelForms, if you need access to fields from the saved object override the get_success_message() method."
I think it's a better solution than putting in lots of hasattr
checks for everyone's specific uses.
Note:
See TracTickets
for help on using tickets.
The patch for this contribution