Ayush Srivastava
Ayush Srivastava

Reputation: 95

use of '{% load staticfiles %}' in css import

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

Answers (1)

rafalmp
rafalmp

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

Related Questions