0

TemplateSyntaxError at / Invalid block tag on line 3: 'static'. Did you forget to register or load this tag?

avatar
Oct. 27, 2020
I am getting below error:
TemplateSyntaxError at / Invalid block tag on line 3: 'static'. Did you forget to register or load this tag?

Home.html
<html>
<head>
<link rel='stylesheet' href="{% static 'styles.css' %}"
</head>
<body>
<h1> Welcome to {{application_name}} </h1>
<p>{{pdata}}</p>
</body>
</html>
avatar
2020-03-08

Hello,

This is because you forgot to load static content at your html templet..

add {% load static %} in first line of your html file..

Home.html
{% load static %}
<html>
<head>
<link rel='stylesheet' href="{% static 'styles.css' %}"
</head>
<body>
<h1> Welcome to {{application_name}} </h1>
<p>{{pdata}}</p>
</body>
</html>



Please Login to Comment