Reputation: 2177
So far, I have been using a stable release of django: 1.3, and my settings.py looked like this (for admin site):
STATIC_URL = '/static/'
ADMIN_MEDIA_PREFIX = '/static/admin/'
I just switched to development version, and once I ran the server, got the following warning:
DeprecationWarning: The ADMIN_MEDIA_PREFIX setting has been removed; use STATIC_URL instead.
"use STATIC_URL instead.", DeprecationWarning)
AND, my admin site looks different now (without all the css, javascript, etc).
I tried changing the static url to different possibilities, and got rid of admin media prefix altogether, but the original look of admin site was not retrieved.
Can someone tell me how to configure this?
Upvotes: 2
Views: 4419
Reputation: 596783
In the next Django version, static files handling behave like the old django-staticfiles app:
./manage.py collectstatic
So you don't need ADMIN_MEDIA_PREFIX
because the admin static files will be either served automatically during dev, or collected automatically by collectstatic
during prod.
STATIC_URL
should match the URL you will serve the static content, ALL of it, in prod. STATIC_ROOT
should be the absolute path to the directory where you want the static files to be copied by collectstatic
.
Upvotes: 2