Reputation: 41
First off, I realize Django 1.8 is outdated but I'm required to learn it for a project. I got through the first five parts without any issues but when I try to link the stylesheet in part 6, my stylesheet isn't loading (there's no change in the page).
I've gone over the code several times and checked the namespacing of each folder and it should be working but I can't seem to find the problem. If anyone has gone through this tutorial and could shed some light on the issue, I'd really appreciate it.
Here's the code in mysite/polls/templates/polls/index.html:
{% load staticfiles %}
<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_t\
ext }}</a></li>
{% endfor %}
</ul>
{% else %}
<p>No polls are available.</p>
{% endif %}
And here's my stylesheet located at mysite/polls/static/polls/style.css:
li a {
color: green;
}
body {
background: white url("images/background.gif") no-repeat right
bottom;
}
Upvotes: 0
Views: 141
Reputation: 41
For anyone with the same issue, restarting the Django server fixed the problem.
Upvotes: 1