0

In my HTML, I want to have the text of a href to be the same as the variable each_files_configs. Whatever I try seems to come out as a literal.

  {% for each_files_configs in files_configs %}
    <p></p>
    <a href="{% url 'download_file' %}">document.write(each_files_configs)</a>
  {% endfor %}

I have also tried <var> and all it does is change the text to italics.

mousetail
  • 7,009
  • 4
  • 25
  • 45
Jonathan E
  • 54
  • 2
  • 12
  • What templating engine is this? Looks like Jinja or django templates – mousetail Aug 02 '22 at 08:25
  • This is django. – Jonathan E Aug 02 '22 at 08:28
  • 2
    Use `{{ expression }}` to insert the return value of a expression into a template – mousetail Aug 02 '22 at 08:28
  • Client side JS (like `document.write`, a function that should almost never be used anyway) goes in ` – Quentin Aug 02 '22 at 08:32

0 Answers0