Django ModelForm Wizard - How to create a database object?

I have a model large enough to be cut in 3 forms. I wanted to use FormWizzard for this, and I wonder how to save the information from the form in the database?

All from one model.

Do you have any idea how to do this?

+3
source share
1 answer

There is no clear / direct way to do this.

However, you can hack to achieve the desired functionality;

I can think of it this way:

  • Create n (the number of pages of the desired wizard) modelforms of the same model, but with different ones fieldsand extrain the meta class.
  • (n-1) pass
  • n super.

, , "", pythonic , .

+3

Source: https://habr.com/ru/post/1724257/


All Articles