Django templates syntax error

前端 未结 2 1090
忘掉有多难
忘掉有多难 2021-01-19 05:59

Is there any problem with the syntax in the following code, there is a error as Invalid block tag: \'else\'

{% ifequal chat_profile 1 %}         


        
2条回答
  •  情书的邮戳
    2021-01-19 06:17

    The documentation states:

    If you use {% extends %} in a template, it must be the first template tag in that template. Template inheritance won't work, otherwise.

    So consider using a design where you can use {% include %} instead.

提交回复
热议问题