Reputation: 91660
I'm getting some really weird issues with the Django admin application. I'm running everything on the manage.py runserver
development server, so I can't imagine what the issue would be, but I'm seeing something like this:
Obviously, this isn't ideal, so I'd like to return it to actually looking good. I'm using the staticfiles
app, which I think might be a part of the problem, but I don't know for sure. What am I doing wrong here?
The admin site seems to link to the following CSS sheets, which aren't being found:
<link rel="stylesheet" type="text/css" href="/media/css/base.css" />
<link rel="stylesheet" type="text/css" href="/media/css/dashboard.css" />
Upvotes: 4
Views: 1286
Reputation: 1574
In settings.py
uncomment(if commented) or add 'django.contrib.staticfiles',
and restart the server.
This should fix it.
Upvotes: 2
Reputation: 239300
I'm assuming you mean you're using the staticfiles contrib package in Django 1.3. If that's correct, you only need:
ADMIN_MEDIA_PREFIX = STATIC_URL+'admin/'
Upvotes: 3
Reputation: 154504
You've probably got your ADMIN_MEDIA_PREFIX
set incorrectly.
Try setting it to:
ADMIN_MEDIA_PREFIX = "/admin-media/"
And see if that fixes everything.
Ok, three more things to check:
/admin-media/
?url(r'^admin-media/', …)
in your root urls.py
?.css
files actually exist in …/site-packages/django/contrib/admin/static/admin
?Upvotes: 1