Python - Django - How to properly handle multiple pages

I have an application that is used to store information about a vehicle. I created a vehicle model with many foreign keys, including a consumption model, a power model, a tire model, a fuel model, etc.

Several page forms:

When a user wants to add a vehicle to their inventory, I wanted to use the multiple page form to break up the steps. So, for example, the first step will be a vehicle model model, and the second step will be a fuel model model. The problem I am facing is storing models on multiple pages without using formwizard.

My thoughts:

There seems to be no information on how to do this, am I the only one who wants to do this, or is this decision clearly obvious? In other languages, I would save all the forms in the session and save them at the end of the process. It seems you can’t store the model in the session because I get an etching error (if I do not serialize it, maybe?), Therefore I assume that it is no-no. I could save the model form of this page in the database before moving on to the next step, but it has several problems. that is, if the user stops halfway?

Any explanation of the normal way this is done, or if it is normal for serializing modelforms, would be very helpful.

+3
source share
1 answer

You are looking for a form wizard:

Django " ", -. HTML-, .

, , , . , ..

docs.

+2

All Articles