I know this question has been asked many times but none of the solutions seems to work for me. I just started using django and I'm having issues trying to get the CSS for the admin panel to show when I use runserver.
When I'm in: localhost:8000/admin/
none of the CSS shows up
<link rel="stylesheet" type="text/css" href="/static/admin/css/base.css" />
<link rel="stylesheet" type="text/css" href="/static/admin/css/dashboard.css" />
That is what is shown in the in the HTML of the admin page, which those URL's it links to ends up becoming http://localhost:8000/static/admin/css/base.css
which doesn't link to anything.
In settings.py I have
TEMPLATE_CONTEXT_PROCESSORS = (
'django.core.context_processors.debug',
'django.core.context_processors.i18n',
'django.core.context_processors.media',
'django.core.context_processors.static',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'codeapp',
'django.contrib.admin',
'django.contrib.admindocs',
)
STATIC_ROOT = '/Users/datboitom/Sites/Codebase/codebase/codeapp/static/'
STATIC_URL = '/static/'
I'm just not too sure what else to do. If can help me to fix this issue that would be great. I've ran python manage.py collectstatic
and the static files are in /Users/datboitom/Sites/Codebase/codebase/codeapp/static/
folder. There just doesn't seem to be any link between these files and whats trying to be loaded. One is trying to load off the localhost url and not the path of where its located on the computer.