Django follows the MVC (Model = database-logic, View=business-logic Controller=presentation logic ). We can write the required logics based on programming[python] syntax in models and views but, when we want to write simple logics we should follow the django's template syntax, because programming[python] syntax is not allowed.
We have the Template syntax as follows:
Same usages as in views:
Operators: == , = , > , >= , < , <=,
Keywords: and , or , not