You'll want to look into the save and delete hooks functionality here: http://www.djangoproject.com/documentation/models/save_delete_hooks/
What it would look like is add to Publications: def save(self): super(Publications, self).save() # Call the "real" save() method customer_list = Subscriber.objects.filter(criteria) etc. I'm not personally familiar with the send_mass_mail ability but you'll be able to integrate it into the above. Adam On 12/12/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > I have two models, Subscriber, which has a front-end userface where > people can sign up for a newsletter and Publication, which has an admin > interface for writing the newsletters. > > What I want to do is to have the ability to fetch the rows in > Subscriber and use these as the datatuple for send_mass_mail when the > writer saves a new entry in the model Publication. > > Can anyone explain to me how I have to go forward to do this? > > The models below: > class Subscriber(models.Model): > name = models.CharField(maxlength=128) > email = models.EmailField() > > def __str__(self): > return self.name > > class Admin: > pass > > class Publications(models.Model): > title = models.CharField(maxlength=192) > content = models.TextField() > signature = models.TextField(default='Best wishes, Henrik Lied') > > def __str__(self): > return self.title > > class Admin: > pass > > Thanks in advance! > --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---