I want to implement a simple 2 part FormWizard. Form 1 will by dynamically generated something like this:
class BuyAppleForm(forms.Form):
creditcard = forms.C
I don't know if answering one's own question is an acceptable behaviour on StackOverflow, here is my solution to my own problem.
First, ditch FormWizard.
I have one form.
Two views: buy_apples
and buy_apples_confirm
First view only handles GET. It prints out the unbound form, with an action to go to the URL of the second view.
The second view checks for the presence of a POST parameter named "confirm". If it is not present (as it is not when the view is loaded the first time) it:
When the user clicks to buy the apples, the form is submitted back and the buy_apples_confirm
view is invoked one more time. This time, a POST parameter called "confirm" is present, so we actually process the purchase transaction and the user gets his apples.
I welcome any critiques on this method or better ways of handling the situation. I am new to Django and find that there are many different ways of approaching a problem. I want to learn from the best though.