Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8587329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:32:38+00:00 2026-06-11T22:32:38+00:00

According to the django 1.4 new features post, django should support elif tags in

  • 0

According to the django 1.4 new features post, django should support elif tags in templates unlike previous versions. I am just upgrading an app from 1.3, and implemented the refactoring with the following result:

Django Version: 1.4.1
Exception Type: TemplateSyntaxError
Exception Value: Invalid block tag: 'elif', expected 'endif'

If anyone has had similar issues, or know about this, please let me know how to do this right. I would like the cleanliness elif gives.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T22:32:39+00:00Added an answer on June 11, 2026 at 10:32 pm

    Django 1.4 definitely supports the ELIF syntax in the template:

    https://docs.djangoproject.com/en/1.4/ref/templates/builtins/#if

    From your error, it looks as though you are definitely using 1.4. Can you post the full if statement? There may be a syntax error between the IF and the ELIF that is causing this. Also, just have to ask, do you have the ENDIF tag to close the if statement?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

According to this SO post: How to check the TEMPLATE_DEBUG flag in a django
According to this section in the Django docs I should use {% blocktrans %}
i am new to django and i want to make a simple form, according
According to my previous question integration of jsf2.0 and spring 3.1 and hibernate 4.1
According to this post , IDEA uses Osmorc to run OSGi frameworks. It, in
According to this post in Recursive Descent vs. LALR , any LALR(k) can be
According to docs at http://code.google.com/p/minify/wiki/UriRewriting $min_serveOptions['rewriteCssUris'] = false; I should be able to add
I'm new to django. I have 2 simple objects, lets call them - File
Django 1.2 has brought in some changes in the syndication framework. According to this
I'm using django.views.generic.list_detail.object_detail. According to the documentation the view takes the variable object_id. To

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.