Django admin - prevent objects being saved, and don't show the user confirmation message -


i want prevent admins modifying data in django. i've done this, when user hits 'save', data correctly not saved, 'success' message displayed @ top telling user data updated. how can replace message?

thanks

i think want use messages framework.

in admin action:

class fooadmin(admin.modeladmin):     ....     def foo_action(self, request, queryset):         ....         self.message_user(request, "%s foo objects not saved" % foos_not_saved) 

in (model)form:

def save(*args, **kwargs):     # stuff     self.message_user(request, "%s fields not saved" % ','.join(fields_not_saved)) 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -