Django formtools wizard with variable number of steps?

66 views
Skip to first unread message

Shawn H

unread,
Nov 23, 2015, 1:16:12 PM11/23/15
to Django users
I'm wondering if I can use django-formtools to accomplish what I want to. I have a License object, with a one to many relationship to LicenseArea. The number of LicenseArea objects varies for each license, so I would like a wizard that has:

Step 0 - the license data
Step 1 - the common data for all LicenseArea objects
Step 2-through n - The same form for each LicenseArea to enter the unique data for each LicenseArea

I've currently implemented this as two steps, one for the License, and then a Formset for each LicenseArea, but as the amount of data for each LicenseArea is significant, the UI leaves a great deal to be desired. I was thinking one step for each LicenseArea would work better. Is this possible, and if so, how best would I implement this? Thanks.

Luis Zárate

unread,
Nov 23, 2015, 5:09:24 PM11/23/15
to django...@googlegroups.com
Did you see this
https://docs.djangoproject.com/en/1.7/ref/contrib/formtools/form-wizard/ ?
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/9a1d3f70-2699-4aea-a34a-65fc70237a45%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

--
"La utopía sirve para caminar" Fernando Birri



Shawn H

unread,
Nov 24, 2015, 11:42:23 AM11/24/15
to Django users
I did, but I'm using Django 1.8, so I'm using django-formtools. The documentation appears to specify that the number of steps must be defined in advance; I'm wondering if that is indeed the case, or if there might a way to have an arbitrary number of steps defined at run time.
Reply all
Reply to author
Forward
0 new messages