django.template.exceptions.TemplateSyntaxError: 'static' is not a registered tag library. Must be one of:

495 views
Skip to first unread message

ragini dahihande

unread,
Dec 29, 2016, 5:30:16 AM12/29/16
to Django users
Hello Guys,
I am new to django.
I created sample project while running it I am getting following error

django.template.exceptions.TemplateSyntaxError: 'static' is not a registered tag  library. Must be one of:

following is my index.html

{% load static %}

<link rel="stylesheet" type="text/css" href="{% static 'polls/style.css' %}" />


{% if latest_question_list %}
   
<ul>
   
{% for question in latest_question_list %}
       
<li><a href ="{% url 'polls:detail' question.id %}">{{question.question_text}}</a></li>
   
{% endfor %}
   
</ul>
   
{% else %}
    <p> No polls are available</
p>
{% endif %}

Thanks,
Ragini

jorr...@gmail.com

unread,
Dec 29, 2016, 5:53:43 AM12/29/16
to Django users
Have you added django.contrib.staticfiles to INSTALLED_APPS in your settings.py?
Reply all
Reply to author
Forward
0 new messages