I have a problem with loading the css file, after calling index.html who 
inherits base_ownsite.html which reads css page will not show background 
color or font color ...

base_ownsite.html

{% load staticfiles %} <!DOCTYPE html> <html lang="en"> <head> <title>{% block 
title %}{% endblock %}</title> <link rel="stylesheet" type="text/css" href="{% 
static 'ownsite/css /style.css' %}" /> </head> <body> {% block content %} {% 
endblock %} </body> </html>

index.html

{% extends 'ownsite/base_ownsite.html' %} {% block content %} {% if 
user.is_authenticated %} <p>Jesteś zalogowany <a href='accounts/my_view'>{{ 
user.username }}</a></p> <p><a href='/accounts/logout_view'>wyloguj</a></p> {% 
else %} <h2>Strona główna</h2> <a href='/accounts/login_view'>logowanie</a> <a 
href='/accounts/register_user'>rejestracja</a> {% endif %} {% endblock %}



style.css



 body {
 background: yellow;
}

h2 {
 color: red;
}

p {
 color: yellow;
 }


settings.py 
STATIC_URL = '/static/'

 STATICFILES_DIRS = (
 "/ownsite/static",
)


-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
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/f8b7d745-5c11-40f3-841d-62c2d2da47fa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to