I used the FormPreview class in contrib.formtools for the first time
on Monday and having worked with class based views, wished it used
FormMixin.

I refactored the FormPreview class to inherit from FormView so Django
provides a more consistent API like its sister tool FormWizard which
recently got an update.

It is 100% backwards compatible though at the expense of clarity. The
old FormPreview class based view used get_context whereas newer CBVs
use get_context_data. I discussed this and other issues in the ticket.
Overall, the mechanisms aren't any different but the code has been
moved around to act more like the other CBVs.

I created a ticket in Trac (https://code.djangoproject.com/ticket/
16174) and you can view the diff on my Github branch of the Django
mirror (https://github.com/ryankask/django/commit/
d92e4f03e81a0648bb7755fe6e43e1309b91f08a).

If this patch isn't acceptable, there a test in contrib.formtools that
should be fixed ("test_form_submit_bad_hash"). The last assertion in
the test will always be true because the request it tests 404s. I
commented on that in the ticket too.

If it is okay, I'd like to test it in the browser a little more and
write better documentation.

Best,
Ryan Kaskel

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" 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 this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to