Anuvrat Parashar
Anuvrat Parashar

Reputation: 3100

Rendering more than one form from one view

I am creating a few interfaces to assist in rudimentary tasks like bulk addition and removal of objects from the database. And I wish to arm the admin / user with a preview. eg A list of all the objects which will be deleted. So the process (from user perspective) is something like this

  1. Initiate the process
  2. Preview the effects
  3. Confirm to start the actual process
  4. Sit back, relax and wait for completion mail.

Which of the following methods, is a good programming practice?

Upvotes: 0

Views: 137

Answers (1)

Rohan
Rohan

Reputation: 53326

From reading your requirements it seems django's form wizard will be better idea as it would easier to

  • Pass data between the forms/steps which probably you will need
  • Going back and forth in the steps is again easier, not much handcrafted code to manage states.

If you are not much comfortable with wizard, having multiple views will be preferable. In that case, you may need to use request.session to pass data between the views.

Upvotes: 1

Related Questions