Forums

Static files in Django

Hello world,

I use "static" in my html pages. In my master template html page, I have "{% load static %}". However, when the page opens, I get "Invalid block tag: 'static' " on a line like this: "<link rel="stylesheet" href="{% static "css/style.css" %}">"

Any ideas why I get this error?

Thanks,

Shailen.

I think the static tag wasn't avaiable in Django 1.3, which was our default. You can upgrade to 1.5 by using a virtualenv. More info here