Retain edit data for one form when submitting a second
may be you can store the first form values in session and provide them as initial data for the first form when you are rendering the second form with error. For eg: data={"f1":request.session['abc'],"f2":request.session["xyz"]} form1 = abc(initial=data)
I have a page that I want to behave like this: First, the user only sees a single form, for the sake of example, lets say it allows the user to select the type of product. Upon submitting this form, a second form (whose contents depend on the product type) appears below it. The user can then either fill out the second form and submit it, or revise and resubmit the first form - either way I want the first form to maintain the user's input (in this case, the product type), even if the second form is submitted.
How can I do this cleanly in django? What I am struggling with is preserving the data in the first form: e.g. if the user submits the second form and it has validation errors, when the page displays the first form the product type will be rendered blank but I want the option to remain set to what the user picked. This behaviour isn't mysterious or unexpected, but is not what I want. Also, if the user submits the second form successfully, I would like to redirect so that the first form maintains the selection and the second form is cleared. 
The best that I've thought of is mucking up the URL with the fields of the first form (admittedly not too many parameters) and storing its state there, or combining both forms into one form object in HTML and responding differently based on the name of the submit button (though I don't see how I could use a redirect to clear the second form and keep the first if I do this). Are there any cleaner, more obvious ways that I'm missing? Thanks.