You may have an error in your css file if the link isn't 404ring when you look at your console or the chrome tab...
I am trying to run a site on Django development server but my css don't load. When I open dev tools in Chrome I see in network that css is loaded as text/plain and not as text/css.My link is good,because when I open it,it opens my css file.And my admin site don't have css also,and that can't be my mistake because I didn't do anything with it! As soon as I change something in css in dev tools css starts working but as soon as I reload the page it is gone!
--
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...@googlegroups.com.
To post to this group, send email to django...@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/e5a23d51-5866-42d0-9e9e-2e69a8c3c340%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<head> <title>Rango</title> <link rel="stylesheet" type="text/css" href="{% static 'css/base.css' %}"/> </head>
import osBASE_DIR = os.path.dirname(os.path.dirname(__file__))TEMPLATE_PATH = os.path.join(BASE_DIR, 'templates')STATIC_PATH = os.path.join(BASE_DIR, 'static')MEDIA_ROOT = os.path.join(BASE_DIR, 'media')STATIC_ROOT = os.path.join(BASE_DIR, 'root/static')
DEBUG = TrueTEMPLATE_DEBUG = TrueALLOWED_HOSTS = []INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'rango',)MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware',)ROOT_URLCONF = 'tango_with_django.urls'WSGI_APPLICATION = 'tango_with_django.wsgi.application'
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), }}
LANGUAGE_CODE = 'en-us'TIME_ZONE = 'UTC'USE_I18N = TrueUSE_L10N = TrueUSE_TZ = True
STATIC_URL = '/static/'STATICFILES_DIRS = ( STATIC_PATH, )TEMPLATE_DIRS = [ TEMPLATE_PATH,]MEDIA_URL = '/media/'