[Django]-Can Django 1.4 support elif in templates?

8👍

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?

Leave a comment