Continued work on a django.contrib.formtools.wizard replacement

66 views
Skip to first unread message

Stephan Jäkel

unread,
Apr 25, 2011, 12:09:37 PM4/25/11
to Django developers
Hi everybody,

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

Jacob Kaplan-Moss

unread,
Apr 25, 2011, 12:41:56 PM4/25/11
to django-developers
On Mon, Apr 25, 2011 at 11:09 AM, Stephan Jäkel <st...@rdev.info> wrote:
> Are there any doubts integrating django-formwizard into Django?

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

Stephan Jäkel

unread,
Apr 25, 2011, 1:39:59 PM4/25/11
to django-d...@googlegroups.com
Jacob Kaplan-Moss wrote:
> 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.

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

Miguel Araujo Pérez

unread,
May 4, 2011, 11:58:47 AM5/4/11
to django-d...@googlegroups.com
As I said before I'm +1 for this. I have to tests latest code against Django 1.3 to see
if it handles browser's back button correctly. But django-formwizard is a great app, far
better and more complete than current contrib's wizard.

I have to apologize for not collaborating in building the docs for this app, I've been
overloaded with work Stephan, sorry.

Cheers,
Miguel

2011/4/25 Stephan Jäkel <st...@rdev.info>


--
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.


David Durham

unread,
May 11, 2011, 2:35:15 PM5/11/11
to django-d...@googlegroups.com
On Mon, Apr 25, 2011 at 11:09 AM, Stephan Jäkel <st...@rdev.info> wrote:
> Hi everybody,
>
> 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 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

Jannis Leidel

unread,
May 11, 2011, 3:31:57 PM5/11/11
to django-d...@googlegroups.com

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

Reply all
Reply to author
Forward
0 new messages