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
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.
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
3 matches
Mail list logo