Re: How to write good form validation in Django?

2010-12-10 Thread Christophe Pettus
On Dec 10, 2010, at 4:01 PM, Ali Ghaffari wrote: > How can the view in "/thanks/" be sure that the form was validated? > Are there any common ways to pass the successful validation of the > form to the next view? Or do I need to do something manually such as > setting a flag in request's

How to write good form validation in Django?

2010-12-10 Thread Ali Ghaffari
I've seen Django's samples and I can see they have decent error handling. However I want to see if there is yet a better approach, a general pattern to handle form validation errors in Django. This is the sample I found here: def contact(request): if request.method == 'POST': # If the form