On 9/7/07, Oleg Korsak <[EMAIL PROTECTED]> wrote:
> I just want to create form_for_model and/or form_for_instance and then
> delete one field (user). Is it possible or do I need to manually create my
> own form?
Sure - use the 'fields' option to specify the subset of model fields
you want to use on the form.
> Also when retrieving a form data from request.POST.copy() - can I
> (how?) update just some fields in existing record. Actually the goal is to
> not show this ForeignKey (user) field and not to update it too. Thanks
>>> Form = form_for_instance(instance, fields=('field1','field2'))
>>> f = Form(request.POST)
>>> f.save()
will update 'field1' and 'field2' on instance, but leave all other
fields unmodified.
Yours,
Russ Magee %-)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---