On Mon, Jul 21, 2008 at 4:09 PM, Django_newbie <[EMAIL PROTECTED]> wrote: > This save() fails because the form.is_valid() is not true, and the > Blog(foreignkey) field is missing from the post data, how can i make > this save without letting user choose this blog field? Or is it > necessary that the foreignkey field has to be alwayz chosen from a > form?
The documentation for ModelForm covers both: 1. Excluding fields from a ModelForm (thus doing away with attempts to validate those fields), and 2. Getting a "partial" object back from a ModelForm which you can modify before actually saving to your database. Details are available here: http://www.djangoproject.com/documentation/modelforms/ -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---