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


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)

create_message.diff (4.0 KB ) - added by ColtonProvias 16 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 by adamfast, 16 years ago

milestone: post-1.0
Triage Stage: UnreviewedDesign decision needed

by ColtonProvias, 16 years ago

Attachment: create_message.diff added

comment:2 by ColtonProvias, 16 years ago

Has patch: set

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.

comment:3 by ColtonProvias, 16 years ago

Owner: changed from nobody to ColtonProvias
Status: newassigned
Triage Stage: Design decision neededAccepted

comment:4 by (none), 15 years ago

milestone: post-1.0

Milestone post-1.0 deleted

comment:5 by Russell Keith-Magee, 14 years ago

Resolution: fixed
Status: assignedclosed

The introduction of class-based views in [14254] will allow you to do this.

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