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.
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?