I know this is not good practice, but is there a way to declare multiple variables in a statement with in a django template.
For example, I want to do something like this:
{% with a="a", b="b", c="c" %} {{a}} {{b}} {{c}} {% endwith %}
Edit My actual use case:
{% with a,b,c=object|get_abc %} {{a}} {{b}} {{c}} {% endwith %}
Edit 2 A new question for the first Change: Assign several variables in an instruction with after returning multiple values from templatetag
The example on the document page clearly states that you can assign several variables, but you do not need these commas:
{% with alpha=1 beta=2 %} ... {% endwith %}
Link:
with template tag
with
Source: https://habr.com/ru/post/1676944/More articles:convert data to libsvm format - apache-sparkSpring download YAML Config not read all values - javaTree depth and degree algorithm - javaTransaction MSDTC advances towards query distribution performed outside the scope of the transaction - c #GraphQL API Testing - node.jsGetting local file in iOS using native - iosДобавление индекса li в алфавит - htmlAssign multiple variables in a with statement after returning multiple values from templatetag - pythonThe difference between the takeWhile () and filter () methods in Kotlin - collectionsSVG с xlink: href не работает в Edge - htmlAll Articles