> 1) What is best practice to populate a custom form with instance data?
Use form = Form(data_dict) and you're done. This also triggers
validation, so it might not be exactly what you want. Though, it's the
only way I know of.

> 2) What is the recommended way to create a single custom form that
> allows two models (related by a foreign key) to be editted/added to?

Use form_for_model or form_for_instance using the fields argument. Make
one form object for each model with the field subset you'd like to use.
There's nothing stopping you from using several form objects in the same
html form. Just remember to validate them all.


--~--~---------~--~----~------------~-------~--~----~
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