views:

194

answers:

1

Hello,

I have a Model enought big to be cut in 3 Forms. I wanted to use FormWizzard to do that and I am wondering, how to save the information from the form to the database?

Everything is from the same model.

Do you have any idea of how to do that ?

+2  A: 

There is no clear/direct way to do this.

However, you could hack around to achieve the desired functionality;

I can think of doing it this way:

  • Create n (the number of pages of wizard you want) modelforms of the same model, but with different fields and extra on the meta class.
  • Override the save of the first (n-1) model forms to just pass
  • Override the save of the last form to create a new model with the data from all n wizard forms, and call super.

However, as I said, this is really a "hack" and it may be clearer and pythonic to use different views, forms and the session.

Lakshman Prasad