Answer by Starbody for Pass variable to href template in Django 2
You can just do: href="/static/{{ stylefolder }}">
View ArticleAnswer by willeM_ Van Onsem for Pass variable to href template in Django 2
Since you are in a template tag, you should not add the double curly brackets {{ .. }}, you can use the variablename instead, like:<link href="{% static stylefolder %}" rel="stylesheet"...
View ArticlePass variable to href template in Django 2
I have below function in my views.py Django 2 project and I am trying to pass the variable "stylefolder" from views.py to my base.html template in order to dynamically get the correct href in my link...
View Article
More Pages to Explore .....