2

How can I print all variables in a jinja2 html template? Is there a list or dict of them I can access and view? I need to be able to do this with out editing the python backend.

{% for var in LIST_OF_VARS %}
  {{ var }}
{% endfor %}

This is not a duplicate of this question How to get a list of current variables from Jinja 2 template? because I need to accomplish this without editing the python backend and adding new code.

Community
  • 1
  • 1
humanbeing
  • 1,617
  • 3
  • 17
  • 30
  • 1
    @martijn-pieters I updated the question so it is not a duplicate. Can you unmark it? – humanbeing Jan 06 '15 at 19:25
  • It is still a duplicate. That post outlines your options, that is *it*. There is no way to do this in just the template. – Martijn Pieters Jan 06 '15 at 20:56
  • 1
    I'd not say this is duplicate, the question is about rendering vars in template, not python code, this is what I was looking for. This is different question. If there is no way to do this, it have to be stated this clearly. – Vedmant Jun 17 '20 at 10:30

0 Answers0