I have some problems adding my CSS to my template using {{STATIC_URL}}. The tag does not work inside link markup, but it works elsewhere. It:
{{ STATIC_URL }}
correctly translated into
/static/
but
link(href="{{ STATIC_URL }}css/bla.css"
to become
<link href="{{ STATIC_URL }}css/bla.css">
I am using pajade with Django. Can anyone help with this?
edit I found the answer: if you want to use static attributes, use '! = 'instead of' = '. Example:
link(href!="{{ STATIC_URL }}css/bla.css"
source share