Opened 15 years ago

Closed 13 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)

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

Download all attachments as: .zip

Change History (6)

comment:1 Changed 15 years ago by adamfast

milestone: post-1.0
Triage Stage: UnreviewedDesign decision needed

Changed 15 years ago by ColtonProvias

Attachment: create_message.diff added

comment:2 Changed 15 years ago by ColtonProvias

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 Changed 15 years ago by ColtonProvias

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

comment:4 Changed 14 years ago by (none)

milestone: post-1.0

Milestone post-1.0 deleted

comment:5 Changed 13 years ago by Russell Keith-Magee

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