Re: Adding fields to form.clean_data

2007-07-30 Thread ilDave
Thank you, I'll try with the commit=False! :) On Jul 30, 5:15 pm, Thomas Guettler <[EMAIL PROTECTED]> wrote: > Hi, > > if the fields will never be edited, you can use editable=False > in your model. > > I do it like this: > > instance=formobj.save(commit=False) > instance.attribute=... > instance

Re: Adding fields to form.clean_data

2007-07-30 Thread Thomas Guettler
Hi, if the fields will never be edited, you can use editable=False in your model. I do it like this: instance=formobj.save(commit=False) instance.attribute=... instance.save() BTW: the "commit" keywords does not mean database commit. If means, don't call save() of the instance. Am Montag, 30.

Adding fields to form.clean_data

2007-07-30 Thread ilDave
Hello! I have a form generated with form_for_model. I deleted a couple of fields from it, beacuse I don't want the user to insert value for them, but their value should be automatically filled after the submit of the form. So, I have something like this: MyForm = form_for_model(myModel) del MyFo