Re: Add some fields on form.save()

2009-10-07 Thread Bogdan I. Bursuc
If you want to set the status field on the model after you save the form, you can do something like this: msg_instance = form.save(commit=False) msg_instance.status = 'F' msg_instance.save() # don't forget the save, because the form didn't # save the model On Wed, 2009-10-

Add some fields on form.save()

2009-10-07 Thread valler
Hello. I can't understand how I can add some extra fields on form saving. Here is a simple example: class Msg(models.Model): title = models.CharField(max_length=30) message = models.CharField(max_length=100) status = models.CharrField(max_length=1,null=True,blank=True) class MsgForm(Mode