Reputation: 95
Do I have to write {% load staticfiles %}
when importing CSS files in my Django templates using {{ STATIC_URL }}
template tag
<link href="{{ STATIC_URL }}abc/xyz/form.css" rel="stylesheet" type="text/css">
Upvotes: 0
Views: 347
Reputation: 4068
No, all you need is 'django.template.context_processors.static'
included in the context_processors
section of the TEMPLATES
' OPTIONS
in your settings.py
.
Upvotes: 2