Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django Invalid block tag: 'static'

Tags:

python

django

I have this in the <head> of my base.html.

{% load staticfiles %}
<link rel="stylesheet" type="text/css" href="{% static "myStyleSheet.css" %}">

and I get error Invalid block tag: 'static'

Within INSTALLED_APPS I've included

'django.contrib.staticfiles',

and I've included within settings.py

STATIC_URL = '/static/' 
STATIC_ROOT = os.path.join(os.path.dirname(__file__), "static/")

Why do I get the load error?

like image 755
HenryM Avatar asked Feb 25 '26 13:02

HenryM


1 Answers

the actual problem here, I'm very sorry to say, was that within my app.yaml file I had specified a different directory for the static files and it seemed to be overriding everything else. Once removed, all sorted.

like image 143
HenryM Avatar answered Feb 28 '26 04:02

HenryM