Code

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#1362 closed defect (fixed)

[patch] magic-removal: User messages

Reported by: anonymous Owned by: jacob
Component: Generic views Version: magic-removal
Severity: normal Keywords:
Cc: russell@… Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Hi,

The following should be applied to create_update to fix message adding in the magic-removal branch.

--- create_update.py~ 2006-02-16 12:56:46.000000000 +0200
+++ create_update.py 2006-02-16 13:01:18.000000000 +0200
@@ -39,7 +39,7 @@

new_object = manipulator.save(new_data)

if not request.user.is_anonymous():

  • request.user.add_message("The %s was created sucessfully." % model._meta.verbose_name)

+ request.user.message_set.add(message="The %s was created sucessfully." % model._meta.verbose_name)

# Redirect to the new object: first by trying post_save_redirect,
# then by obj.get_absolute_url; fail if neither works.

@@ -110,7 +110,7 @@

manipulator.save(new_data)

if not request.user.is_anonymous():

  • request.user.add_message("The %s was updated sucessfully." % model._meta.verbose_name)

+ request.user.message_set.add(message="The %s was updated sucessfully." % model._meta.verbose_name)

# Do a post-after-redirect so that reload works, etc.
if post_save_redirect:

@@ -177,7 +177,7 @@

if request.METAREQUEST_METHOD? == 'POST':

object.delete()
if not request.user.is_anonymous():

  • request.user.add_message("The %s was deleted." % model._meta.verbose_name)

+ request.user.message_set.add(message="The %s was deleted." % model._meta.verbose_name)

return HttpResponseRedirect(post_delete_redirect)

else:

if not template_name:

Attachments (0)

Change History (4)

comment:1 Changed 8 years ago by anonymous

  • Cc russell@… added

comment:2 Changed 8 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(In [2317]) magic-removal: Fixed #1362 -- Fixed old-style DB API usage in create_update generic views.

comment:3 Changed 8 years ago by slav

<a href="http://allthemusic.siteburg.com">http://allthemusic.siteburg.com</a>
<a href="http://allthemusic.siteburg.com/music-site-myspacecom.html">http://allthemusic.siteburg.com/music-site-myspacecom.html</a>
<a href="http://allthemusic.siteburg.com/free-mp3-music-download.html">http://allthemusic.siteburg.com/free-mp3-music-download.html</a>
<a href="http://allthemusic.siteburg.com/buy-music-and-dvd-online.html">http://allthemusic.siteburg.com/buy-music-and-dvd-online.html</a>
<a href="http://allthemusic.siteburg.com/listen-to-free-music.html">http://allthemusic.siteburg.com/listen-to-free-music.html</a>
<a href="http://allthemusic.siteburg.com/country-music-market-share.html">http://allthemusic.siteburg.com/country-music-market-share.html</a>
<a href="http://allthemusic.siteburg.com/myspace-music-video-code.html">http://allthemusic.siteburg.com/myspace-music-video-code.html</a>
<a href="http://allthemusic.siteburg.com/radio-city-music-hall.html">http://allthemusic.siteburg.com/radio-city-music-hall.html</a>
<a href="http://allthemusic.siteburg.com/free-legal-music-download.html">http://allthemusic.siteburg.com/free-legal-music-download.html</a>
<a href="http://allthemusic.siteburg.com/free-music-video-code.html">http://allthemusic.siteburg.com/free-music-video-code.html</a>
<a href="http://allthemusic.siteburg.com/listen-to-music-online.html">http://allthemusic.siteburg.com/listen-to-music-online.html</a>
<a href="http://allthemusic.siteburg.com/free-ares-music-download.html">http://allthemusic.siteburg.com/free-ares-music-download.html</a>
<a href="http://allthemusic.siteburg.com/free-music-code-for-myspace.html">http://allthemusic.siteburg.com/free-music-code-for-myspace.html</a>
<a href="http://allthemusic.siteburg.com/free-music-download-site.html">http://allthemusic.siteburg.com/free-music-download-site.html</a>
<a href="http://allthemusic.siteburg.com/free-kazaa-music-download.html">http://allthemusic.siteburg.com/free-kazaa-music-download.html</a>
<a href="http://allthemusic.siteburg.com/download-free-music-video.html">http://allthemusic.siteburg.com/download-free-music-video.html</a>
<a href="http://allthemusic.siteburg.com/free-piano-sheet-music.html">http://allthemusic.siteburg.com/free-piano-sheet-music.html</a>

comment:4 Changed 8 years ago by fish

www.slav75.vzz.net
www.slav75.jktf.com
www.slav75.nipz.com
www.slav75.computed.net
www.slav75.gapgirls.com
www.slav75.saiyan.ws
www.slav75.saiyans.ws

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.