﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
1362	[patch] magic-removal: User messages	anonymous	Jacob	"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.META['REQUEST_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:
"	defect	closed	Generic views	magic-removal	normal	fixed		russell@…	Unreviewed	1	0	0	0	0	0
