19👍
✅
Try this by keeping space around operator
{% if forloop.counter <= 12 or forloop.counter >= 25 %}
2👍
https://docs.djangoproject.com/es/1.10/ref/templates/builtins/#id4, i think the problem is that you forgot the space betwen the operator and the variable.
foorloop.counter <= 12
0👍
The parser used by Django templates fails to parse the values if there is a lack of whitespace around the operators. There was a ticket #27022 opened on Django’s issue tracker but it has been marked as "wontfix" in an effort to enforce a consistent style in templates.
Hence you need to update your code and add spaces around the operators:
{% if forloop.counter <= 12 or forloop.counter >= 25 %}
- How to obtain distinct values over Django Query Set?
- Is it possible to stop Django from creating .pyc files, whilst in development?
- Django python 'sql_server.pyodbc' isn't an available database backend
- REMOTE_ADDR not getting sent to Django using nginx & tornado
Source:stackexchange.com