On March 12, 2012, at 14:47 , Clay McClure wrote:
> On Thursday, February 23, 2012 10:41:36 AM UTC-5, Tom Evans wrote:
> there is also the possible source of confusion stemming from the fact that
> in template language we write:
>
> {% if user.is_authenticated %}
>
> but in Python we write:
>
> if user.is_authenticated():
>
> You could easily get used to writing it the first way if you do a lot of
> template development, and then accidentally write it that way when you switch
> back to Python:
>
> if user.is_authenticated:
>
> which will happily and quietly always evaluate to True.
I've made this error. It's a pita to debug, too.
Regards,
Luke
--
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send email to [email protected].
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.