[Django] #22794: Using WizardForm with only one model

4 views
Skip to first unread message

Django

unread,
Jun 8, 2014, 9:33:32 AM6/8/14
to django-...@googlegroups.com
#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.

Django

unread,
Jun 13, 2014, 2:59:37 PM6/13/14
to django-...@googlegroups.com
#22794: Using WizardForm with only one model
----------------------------------+--------------------------------------
Reporter: sofi.vasserman@… | Owner: nobody
Type: New feature | Status: closed
Component: Uncategorized | Version: 1.6
Severity: Normal | Resolution: wontfix

Keywords: WizardForm | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------
Changes (by timo):

* status: new => closed
* needs_better_patch: => 0
* resolution: => wontfix
* needs_tests: => 0
* needs_docs: => 0


Comment:

I'm not sure an implementation of this is going to be sufficiently simple
and general enough for inclusion in Django itself. It you could provide
some working code for idea, perhaps we could consider it.

--
Ticket URL: <https://code.djangoproject.com/ticket/22794#comment:1>

Reply all
Reply to author
Forward
0 new messages