Re: Help with many-to-many field update

2011-11-24 Thread Leslie Maclachlan
Hi Mario, Thanks so much - I updated my view as below and it is now working as expected! Regards, Leslie if form.is_valid(): new_item = form.save(commit=False) new_item.client = orderClient new_item.orderdate = datetime.now() new_item.orderIP = remot

Re: Help with many-to-many field update

2011-11-24 Thread Mario Gudelj
Hey Leslie, Try add() method like in this answer on SO http://stackoverflow.com/questions/1226290/django-manytomany-relation-add-error Cheers, On 25 November 2011 00:43, Nichehosters wrote: > Hi, > I am relatively new to Django, and am trying to update a many-to-many > related table using a Mo

Help with many-to-many field update

2011-11-24 Thread Nichehosters
Hi, I am relatively new to Django, and am trying to update a many-to-many related table using a ModelForm. I see fro the documentation that if I use save(commit=False) - which I do - I need to use save_m2m() after saving the initial form. I am using the save_m2m(), but my related table does not ge