Allow declaration form_list and condition_dict in WizzardView subclass, not as params to as_view
|Reported by:||migajek||Owned by:||steph|
|Severity:||Normal||Keywords:||cbv wizzard wizzardview|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
every standard django CBV allows for declaring some attributesin the subclass to avoid passing them to as_view function in urls.py module.
Unfortunately this does not apply to WizzardView, which does not allow a declaration of form_list nor condition_dict in a WizzardView subclass - each of these must be passed as an argument to as_view function.
Since we need to subclass the view anyway (to define form processing function) AND the condition_dict contains a view logics, I believe the proper place for those attributes would be views.py - WizardView subclass, NOT urls.py - as_view params.
example code provided here http://stackoverflow.com/q/13669033/146248
Change History (5)
comment:1 Changed 19 months ago by apollo13
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted
comment:3 Changed 18 months ago by steph
- Owner changed from nobody to steph
- Status changed from new to assigned