#22794: Using WizardForm with only one model ----------------------------------+------------------------ Reporter: sofi.vasserman@… | Owner: nobody Type: New feature | Status: new Component: Uncategorized | Version: 1.6 Severity: Normal | Keywords: WizardForm Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 ----------------------------------+------------------------ In some cases the model for which you create a form has to many fields and using only one form will create a very long form which is not comfortable for the user. In this case I would to break the forms into more than one page, and for that I would like to use the WizardForm. The problem I encountered while using the wizardForm is that form has to have it's own modelForm, which makes me to have a form with only part of the model fields. If my fields are defined as not nullable, this scenario creates a problem in saving the object. For this there two solutions - either I create two models that are compatible to my forms and have a OneToOne relationship, either I have to change the save method in which I combine the data from the two forms. I chose the second option and had problems with the saving problems until I realized I have to override the save_instance procedure. I think cases in which a model has many fields that will create a very long form are very common, and in this cases there is a need to use WizardForm in which each form represents only part of the model. There should be an easy way to handle this situation, maybe changing the save method of the wizard form and add the parameter construct, so we will be able to change it to true in the save method.
-- Ticket URL: <https://code.djangoproject.com/ticket/22794> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.f02e35173c3dbe7baf5638a45840deec%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.