On Sat, Aug 23, 2008 at 4:34 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]>wrote:
> > OK, I've found why it wasn't returning an httpresponseobject. It was > because I wasn't returning a render_to_response on validation fail. > However I cannot get my errors to show on the form. Any ideas ? > Follow the pattern from the docs: http://www.djangoproject.com/documentation/forms/#simple-view-example The code you had was recreating an empty form in the case where the original form did not validate. You don't want to that. If is_valid() returns False you want to leave the the form as-is and redisplay it (that is, fall through to the render_to_response at the bottom). That way the user will see what they have entered plus whatever error messages were added to the fields during validation. Karen --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---