Opened 18 years ago

Closed 17 years ago

#3356 closed (wontfix)

Ability to turn off new message in the Message framework when using create/edit/delete generic view

Reported by: anonymous Owned by: nobody
Component: Generic views Version: dev
Severity: Keywords: generic views, message
Cc: Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

It would be great if Django provided a parameter to disable creating
a new message when using create/update/delete generic view.

It would be enabled by default.

Something like:

def delete_object(request, model, post_delete_redirect ...., create_info_message=True)

...

if request.user.is_authenticated() and create_info_message:

request.user.message_set.create(message=gettext("The %(verbose_name)s was deleted.") % {"verbose_name": model._meta.verbose_name})

return HttpResponseRedirect(post_delete_redirect)

Change History (3)

comment:1 by Simon G. <dev@…>, 18 years ago

Triage Stage: UnreviewedDesign decision needed

comment:2 by James Bennett, 17 years ago

Since any RequestContext will, by default, clear the messages anyway, what's the use case for this?

comment:3 by Jacob, 17 years ago

Resolution: wontfix
Status: newclosed

This minor change isn't worth the added argument to the generic views. You can accomplish the same thing with a wrapper around the generic view that clears messages after the view runs.

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