Hi Sithembewena,

If you want to monitor changes to tables then you might also be interested in 
keeping audit/history records. See the book ProJango by Marty Alchin Chapter 11 
(page 263 onwards) and http://qr7.com/2010/10/django-simple-history-ftw/  by 
Corey Bertram

Regards
Chris

From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On 
Behalf Of Sithembewena Lloyd Dube
Sent: 15 February 2011 11:17
To: django-users@googlegroups.com
Subject: Saving multiple records from admin list page

Hi all,

In my admin.py, I overrode the save() function of a model as follows:

from myproject.myapp.functions import 
send_staking_request_status_notification_email

def save_model(self, request, obj, form, change):
          staking_request = obj
          obj.save()
          send_staking_request_status_notification_email(staking_request)

Therefore, when an admin user logs in and saves a record, an email is sent off 
to a site member. The function that does the emailing is imported from a custom 
module and this works fine.

However, on the list page of said model in the admin area, the admin user is 
also able to select an action to apply to multiple records. How can I modify my 
admin.py so that the save() override specified above
fires for all records?

Thanks.
--
Regards,
Sithembewena Lloyd Dube
--
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to