I'd like to make a page, where the user will be able to edit a data of his account and add photos. There will be 2 buttons: add photo, and submit form. Add photo button will cause adding a photo to the server, so the form will be submited, and then in the response generated by django (so that the fields user entered before adding a photo weren't cleaned) there will be error messages if the user filled the email field for example "addres@". So I'd like to do validating of "non image" fields only after submiting a form.
2009/3/23 Malcolm Tredinnick <malc...@pointy-stick.com> > > On Mon, 2009-03-23 at 00:59 +0100, Marek Wawrzyczek wrote: > > Hi > > > > Is there any possibility, to create an bound instance of a form (even if > > it contains fields with incorrect data) and then resend the form to the > > page without validating ? > > > > Almost certainly yes, since there's nothing to stop you overriding any > methods you like in your Form subclass and if a user submits invalid > data it's already sent back to the web page (so Django already does > something like that). However, what's the problem you're really trying > to solve here? There might be a better approach that requires less > hacking at the internals. > > Regards, > Malcolm > > > > > -- Pozdrawiam, Marek Wawrzyczek --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---