TemplateSyntaxError: 'with' expected with atleast one variable assignment

前端 未结 1 893
眼角桃花
眼角桃花 2021-01-13 03:52

I am trying to send the data of a meeting object from template to view via GET method. To give the attribute meeting.date

1条回答
  •  迷失自我
    2021-01-13 04:26

    There should be no spaces around =. Either use

    {% with date=meeting.date %}
    

    or the old syntax

    {% with date as meeting.date %}
    

    0 讨论(0)
提交回复
热议问题