I have a Person table and Phone table. The Phone table has a foreign key into the Person table, which is an auto-increment ID. Each person can have an arbitrary number of phone numbers. Is there a way for me to create a Django form to enter phone numbers while creating a new Person entry and edit them along with an existing Person entry?
+3
A:
Yes, Django's inlineformset_factory is exactly what you need.
Docs: Model Formsets and Inline formsets
This snippet should help you as an example.
Van Gale
2009-01-08 04:11:26
I think you're right -- this looks like exactly what I need. Thanks!
Fred Larson
2009-01-08 05:51:04