On Fri, Jun 5, 2009 at 11:04, adelaide_mike <mike.ro...@internode.on.net>wrote:
> Exception Value: 'PropertyForm' object does not support item > assignment > There you go. You can't do: > form['street']=request.session['street_id'] You can save the form instance first, without commiting, then set the street the instance: if form.is_valid(): instance = form.save(commit=False) instance.street = request.session['street_id'] instance.save() form.save_m2m() see: http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#the-save-method --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---