Hey all, I've created a ticket which has been closed as wontfix, and was told to bring it here. So here I am.
<http://code.djangoproject.com/ticket/5153> So yeah, I want to be able to show previews of data that may at that point not be valid. Imagine there's a form with 12 required fields, and I want to enable users to see what their entry would look like even before they've completely filled everything in. (Using some AJAX tricks to do that without leaving the page.) For that kind of preview I want to reuse the templates that are used to present the final data. So I want to take the data from the form, pack it into a temporary/unsaved model object, and pass that object into the template. contrib.formtools.FormPreview implements a different kind of approach, and can't be used for this. Now, that use case may sound crazy to you (I don't know why it would, but hey). But the point is that there is currently NO WAY to do this with newforms. Honestly, the design of newforms.Form.clean(), where it deletes its own "cleaned_data" attribute as soon as there's a single validation error, is totally backwards and unpythonic. There should be *some* way to get at the cleaned_data values, even if some of the fields failed to validate. So, I created a fairly simple and clean patch to enable me to do what I want to do here: <http://code.djangoproject.com/attachment/ticket/5153/ ticket5153.diff> I personally think it'd be a good idea to apply. Thanks, Chris -- Christopher Lenz cmlenz at gmx.de http://www.cmlenz.net/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---