#3670: ifequal and ifnotequal failing with negative numbers
---------------------------------------------------+------------------------
          Reporter:  [EMAIL PROTECTED]  |         Owner:  adrian                
     
            Status:  new                           |     Component:  Template 
system            
           Version:  SVN                           |      Keywords:  ifequal 
ifnotequal negative
             Stage:  Unreviewed                    |     Has_patch:  1          
                
        Needs_docs:  0                             |   Needs_tests:  0          
                
Needs_better_patch:  0                             |  
---------------------------------------------------+------------------------
 {{{
 {% ifequal -1 -20 %}
 hello
 {% endifequal %}
 }}}
 
 prints "hello"
 
 {{{
 {% ifnotequal -1 -1 %}
 hello
 {% endifnotequal %}
 }}}
 
 doesn't print anything
 
 this because in resolve_variable( ) in django.template.__init__ uses:
 
 {{{
 if path[0].isdigit():
 }}}
 
 which could be:
 
 {{{
 if path[0].isdigit() or path[0] == "-":
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3670>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" 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-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to