On Thu, Mar 26, 2009 at 12:26 PM, Adam Yee <adamj...@gmail.com> wrote:

>
> <p>{{ error }}</p>
> <form method="POST" action="{{ script_name }}/stl_login/">
> {{ form.as_p }}
> <input type="submit" value="Login" />
> </form>
>

form.as_p ought to be showing the errors on the form.  So I'm puzzled by how
is_valid could be returning False but no errors are being displayed.


> Guessing is sometimes all one can do after analyzing to their limit.
> Or they can be lazy without any personal effort and post to a group
> like this one (which I don't recommend).  I spent as much time allowed
> figuring out what I could, then came to you.  I strive to lessen the
> amount of guessing I do and develop the skills needed to figure out
> problems...but that takes time.
>
> I've been reading up on validating since I feel the problem lies in
> the is_valid part.  Again, I understand this is a guess, I just need
> to direction in figuring out the problem.  I'm not merely looking for
> the quick and easy solution.
>
> What I do know is that rendering a template is a separate action from
> validating.  Validation should take place before rendering.  If I
> can't validate properly, it won't show in the template properly,
> right?  Thanks Karen.
>

It's perfectly OK to render in a template a form that returns False from
is_valid, that is normally what is done to point out the validation errors
in the submitted data.  is_valid returning False doesn't make the form
invalid for displaying, it just means there is something in the submitted
data that is not passing validation.  In your case what I'd be doing at this
point is probably stepping through the form cleaning code in a debugger to
figure out what is going on.

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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to