I am working in Django 1.5. I have a task submitting a form and editting it. My form contains order details, customer details, purchased product details, attachments and comments. Order details model have customer foreign key, product details have order foreign key. I am using modelform objects of order details,customer details,attachments and comments and inlineformset_factory object for products. I have successfully inserted data using this 'multi-object' form. Now I would like to edit this form. All these form objects have to be passed to the template. Please help me. Thanks in advance.
Edit django form containing modelforms and inline formset factory
602 views Asked by user12757 At
1
With an existing template it's very easy to create your forms. Just add your specific forms to your template like this example below:
Of course your view needs to instantiate them correctly.
The
enctype="multipart/form-data"
you only need if you have data like files or images.