Opened 16 years ago
Closed 14 years ago
#8167 closed (fixed)
Allow custom message to be set in the create/update/delete generic views
Reported by: | peterd12 | Owned by: | ColtonProvias |
---|---|---|---|
Component: | Generic views | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The views in django.views.generic.create_update automatically creates the message "The %(verbose_name)s was deleted." It would be nice to have an additional argument to these views called "message" where users could set their own message. For instance, I'm using the message '%(verbose_name)s "%(object_name)s" successfully deleted' in my views.
Attachments (1)
Change History (6)
comment:1 by , 16 years ago
milestone: | → post-1.0 |
---|---|
Triage Stage: | Unreviewed → Design decision needed |
by , 16 years ago
Attachment: | create_message.diff added |
---|
comment:2 by , 16 years ago
Has patch: | set |
---|
comment:3 by , 16 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Triage Stage: | Design decision needed → Accepted |
comment:5 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
The introduction of class-based views in [14254] will allow you to do this.
Note:
See TracTickets
for help on using tickets.
I attempted to create a small patch to add on this functionality. It processes the string passed to it as a template and renames model._meta to model.meta. If something doesn't work, I apologize as this is my first attempt at a patch to django.