On Dec 10, 7:24 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> You say you excluded 'product' from the form but the code you posted has not
> excluded 'product', it has excluded 'parent' and 'usePrice'.

Ahem....[hides under a rock in shame]...I guess copy/paste got me
there.

> Also, the technique you are using of creating the ModelForm with an instance
> parameter so as to provide values for fields that are excluded from the form
> (as described 
> here:http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#using-a...)
> is to avoid errors during model save, not form validation.  This data is not
> used during form validation (after all it's for supplying values for the
> model instance for fields excluded from the form -- so the form knows
> nothing of these fields and won't attempt to validate them.  You seem to be
> confusing two separate things here -- what's a required field on the form
> and what's required when saving an instance to the DB.

Very valuable insight. Thanks. I indeed confused the two, but the real
problem was of course that I was excluding the wrong formfield. :(

Thanks,
2B
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to