#18803: Django FormWizard.as_view condition_dict callable called multiple times?
-------------------------+-------------------------------------------------
Reporter: | Owner: nobody
mikewatsup@… | Status: new
Type: Bug | Version: 1.4
Component: | Keywords: form wizard, as_view,
contrib.formtools | condition_dict argument
Severity: Release | Has patch: 0
blocker | UI/UX: 0
Triage Stage: |
Unreviewed |
Easy pickings: 0 |
-------------------------+-------------------------------------------------
The following is a snippet of how I have setup my FormWizard. When I hit
this view function, 'bar' gets printed once and 'foo' gets printed 7
times:
{{{
#!python
# views.py
def _show_repair_item_form_condition(wizard):
print 'foo'
return True
@login_required
def workshop(request):
print 'bar'
cw = WorkshopWizard.as_view([WorkshopRepairItemFormSet, EmptyForm],
condition_dict={'0': _show_repair_item_form_condition})
return cw(request)
}}}
I have looked at the implmentation of the as_view function and can't find
any trace of a bug causing this to happen. There is no documentation on
the web about this issue either.
Any ideas?
Thanks, Mike
--
Ticket URL: <https://code.djangoproject.com/ticket/18803>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.