Template error: In template /Users/username/django-sites/username.com/public/templates/ tagging/tag_list.html, error at line 17 'if' statement improperly formatted 7 : <a class="link-item" href="{% url tag_detail object.name %}"> {{ object.name }}</a>
8 : </h5> 9 : </div> 10 : {% endfor %} 11 : <div class="pagination"> 12 : <span class="step-links"> 13 : {% if page_obj.has_previous %} 14 : <a class="continue-link" href="/tags/page {{ page_obj.previous_page_number }}">previous</a> 15 : {% endif %} 16 : 17 : {% if page_obj.number < paginator.count %} 18 : 19 : {% endif %} 20 : 21 : {{ paginator.count }} 22 : 23 : <span class="current"> 24 : Page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }}. 25 : </span> 26 : 27 : {% if page_obj.has_next %} Traceback: File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ site-packages/django/core/handlers/base.py" in get_response 92. response = callback(request, *callback_args, **callback_kwargs) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ site-packages/django/views/generic/list_detail.py" in object_list 100. t = template_loader.get_template(template_name) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ site-packages/django/template/loader.py" in get_template 82. template = get_template_from_string(source, origin, template_name) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ site-packages/django/template/loader.py" in get_template_from_string 90. return Template(source, origin, name) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ site-packages/django/template/__init__.py" in __init__ 168. self.nodelist = compile_string(template_string, origin) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ site-packages/django/template/__init__.py" in compile_string 189. return parser.parse() File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ site-packages/django/template/__init__.py" in parse 285. compiled_result = compile_func(self, token) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ site-packages/django/template/loader_tags.py" in do_extends 169. nodelist = parser.parse() File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ site-packages/django/template/__init__.py" in parse 285. compiled_result = compile_func(self, token) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ site-packages/django/template/loader_tags.py" in do_block 147. nodelist = parser.parse(('endblock', 'endblock %s' % block_name)) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ site-packages/django/template/__init__.py" in parse 285. compiled_result = compile_func(self, token) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ site-packages/django/template/defaulttags.py" in do_if 822. raise TemplateSyntaxError, "'if' statement improperly formatted" Exception Type: TemplateSyntaxError at /tags/page1/ Exception Value: 'if' statement improperly formatted On Jan 8, 5:52 pm, Justin Steward <althalu...@gmail.com> wrote: > On Fri, Jan 8, 2010 at 1:25 PM, Biju Varghese <bijukava...@gmail.com> wrote: > > if statement in template language checks only whether the variable is > > empty or not... > > comparison can be done with other variants of if such as ifequals > > ifnotequal etc... > > OP is using django > 1.2.http://docs.djangoproject.com/en/dev/releases/1.2-alpha-1/#smart-if-tag > > ~Justin
-- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.