Wednesday, December 27, 2017

Re: tutorial p.6 problem: style.css isn't loaded

Same error happens to me, 

Restart mysite with `python runserver` fix it.

It may because new created files not auto detected by django.


On Wednesday, February 5, 2014 at 9:45:20 AM UTC-8, Janek Warchoł wrote:

i'm following Django's tutorial (very nice, btw) and static files don't work for me.  I have a test project created along the previous parts of the tutorial, and now i'm here:

According to instructions, I've added a style.css file to BASE_DIR/polls/static/polls/ subdir and inserted

{% load staticfiles %}

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

into my polls/templates/polls/index.html - however, it doesn't have any effect (i.e. the links in the poll list aren't green), and when i look into the shell where Django development server is running, i see

"GET /static/polls/style.css HTTP/1.1" 404 1649

so, it seems that the file cannot be accessed at all.  But i'm at a loss of why it doesn't work :(

Any ideas?
If anyone wants to look at my code, it's here:


You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
To view this discussion on the web visit
For more options, visit

No comments:

Post a Comment