On Thu, Sep 24, 2009, mrts <m...@mrts.pri.ee> wrote: >So, given a obj = Referrer("foo"), updating its many-to-many field can >happen only after obj.save() returns (this is documented in >http://www.djangoproject.com/documentation/models/many_to_many/ ). > >If you are not able to call obj.save() and then manually update the >fields,
Thanks - I have saved the object, with super(Event, self).save() in the save() function, and then updated the fields. However: I still need to save those changed fields to the database. If I call self.save, I end up recursing indefinitely. If I call super(Event, self).save() again, it appears to save nothing. So: having set the variables, how do I save them to the database? The documentation at <http://www.djangoproject.com/documentation/models/ many_to_many/> doesn't mention how to do this - just how to make changes to the object, My function as it now stands is at <http://dpaste.com/97609/>, if that helps Daniele --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---