Django

Code

Ticket #7222 (new)

Opened 2 months ago

Last modified 3 weeks ago

FormPreview should pass the form to done()

Reported by: Samuel Cormier-Iijima <sciyoshi@gmail.com> Assigned to: nobody
Milestone: Component: django.contrib.formtools
Version: SVN Keywords: formpreview done cleaned_data form
Cc: sciyoshi@gmail.com Triage Stage: Design decision needed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

Currently, FormPreview?'s done() gets passed the request and the form's cleaned_data, but it'd be much nicer if done() got passed the actual form instead. This way, for ModelForms?, one could just do form.save(). You can still get the cleaned_data with form.cleaned_data. Attaching a patch that breaks backwards compatibility, but I think its nicer in the long run...

Attachments

preview.diff (2.3 kB) - added by Samuel Cormier-Iijima <sciyoshi@gmail.com> on 05/12/08 12:57:48.
preview.2.diff (2.7 kB) - added by Samuel Cormier-Iijima <sciyoshi@gmail.com> on 05/12/08 12:59:01.
forgot to change done() parameter

Change History

05/12/08 12:57:48 changed by Samuel Cormier-Iijima <sciyoshi@gmail.com>

  • attachment preview.diff added.

05/12/08 12:59:01 changed by Samuel Cormier-Iijima <sciyoshi@gmail.com>

  • attachment preview.2.diff added.

forgot to change done() parameter

05/12/08 13:03:47 changed by brosner

  • needs_better_patch changed.
  • version changed from newforms-admin to SVN.
  • needs_tests changed.
  • needs_docs changed.

This has nothing to do with newforms-admin. :)

06/16/08 01:39:18 changed by programmerq

  • stage changed from Unreviewed to Design decision needed.

Add/Change #7222 (FormPreview should pass the form to done())




Change Properties
Action