the static tag should be
{% static 'mainsite/bootstrap.css' %}
according to the layout you said
On Tue, Jan 6, 2015 at 8:30 PM, Sithembewena Lloyd Dube <[email protected]>
wrote:
> Hi everyone,
>
> I have a Django 1.7.1 project structured as per documentation. In it, I
> have an app called "mainsite". In mainsite, I have
> templates/mainsite/index.html and static/mainsite/bootstrap.css. In the
> index template, I use {% load staticfiles %} and then for css I have the
> following link: <link href="{% static "css/bootstrap.css" %}"
> rel="stylesheet"> However, when I load the page in the browser, the css
> does not load and when in "view source" mode, I click the link href
> ("/static/css/bootstrap.css"). This generates a 404 error.
>
> What am I missing? Any suggestions welcome.
>
> P.S: I have the STATIC_URL = '/static/' setting defined in the settings
> file.
>
> --
> Regards,
> Sithu Lloyd Dube
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAH-SnCBJamc9ZKzmy3y63fAo5n7p7xT6G8oAiu%3DFUbjM-KF%2Bbw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAH-SnCBJamc9ZKzmy3y63fAo5n7p7xT6G8oAiu%3DFUbjM-KF%2Bbw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/CALn3ei1gt%2BKmk9zU%3DGRuR8DFxmYiwyQ_cF%2Ba9fMTgMk3Vg0nmA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.