It's my first approach to matplotlib.
I have been trying for a while to print my plots in a template. I know how if I do this for just one image, but now I'm trying to modify it and call different images.
I got this and it works perfectly:
<img src="{% static "/consulta/imagenes/rosavientos.png" %}">
But I'm trying to use this path: "/consulta/imagenes/rosavientos.png" like this:
<img src="{% static {{ my_path }} %}">
But ID or literal expected after static.
Is it possible to do this in any way?
PS: I also tried this:
In my view:
ruta_estatica = "<img src = \"{% static '/consulta/imagenes/" + nombre_png + ".png' %}\">"
In the template:
{% autoescape off %}{{ respuesta3 }}{% endautoescape %}