I want to continue the discussion on the replacement of
django.contrib.formtools.wizard (previous discussions can be found here:
http://bit.ly/eI5ZT5 and http://bit.ly/gVTRtr).
I worked on moving the currently external django-formwizard to use class
based views. The repository/code can be found here: http://bit.ly/hjesw4
I'm now at a point where the wizard is able to replace the old
django.contrib.formtools.wizard and add many new features including file
support, formset support, modelform/modelformset support and other stuff.
Are there any doubts integrating django-formwizard into Django?
Cheers,
Stephan
I'm +1 in theory. I need to spend some time going through your code,
and I'll need to see some documentation on porting existing wizards to
the new code (unless it's truly 100% backwards compatible). But in
general I think it's a fine idea and something I'd love to target for
1.4.
Jacob
Based on the current documentation
(http://docs.djangoproject.com/en/dev/ref/contrib/formtools/form-wizard/) of
the FormWizard, there are some things to change:
- The "done" method exists in the new FormWizard but there is no request
argument, the request instance can be found in self.request.
- the context variable names are prefixed with "form_" and there is no
"previous_fields" variable. (data is stored within the session or cookie)
- Hooking into a urlconf has changed, a as_view method needs to be called,
because we use the generic class based views.
- The "prefix_for_step" method was renamed to "get_form_prefix" and now gets
the form instance as an argument too.
- The methods "render_hash_failure" and "security_hash" don't exist anymore
(because of the storage backends)
- The "parse_params" method don't exist anymore but you can hook into the
get/post methods.
- The "get_template" method don't exist anymore but there is the
get_template_names method from TemplateView.
- The "process_step" method exists but has no request argument (the request
instance can be found in self.request)
As you can see, many things changed but I think is reasonable if you look on
the improvements.
Cheers,
Stephan
--
You received this message because you are subscribed to the Google Groups "Django developers" group.
To post to this group, send email to django-d...@googlegroups.com.
To unsubscribe from this group, send email to django-develop...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.
I keep seeing some maintenance type of activities taking place against
the ticket I created:
http://code.djangoproject.com/ticket/9200
Probably someone should just close this ticket?
-Dave
Yeah, we've just updated the attached patch with the recent changed
made in the depending ticket #12417, so closing isn't a good idea.
http://code.djangoproject.com/attachment/ticket/9200/ticket9200-1.diff
Also see the other thread about signing [1].
Please don't hesitate to take a look at the changes, even if the
docs are currently sparse, we intend to improve them in the next
couple of days. Of course patches are more than welcome.
Stephan and Jannis
1: http://groups.google.com/group/django-developers/browse_thread/thread/ef65c82c5252ac5d