Django admin css not loading

When I have moved my project from MAC to windows, the admin page style are broken.
The css files are trying to load as admin/admin/css/….
so I have to specify the static config in settings.py as blow
old

STATIC_URL = os.path.join(BASE_DIR, ‘static/’)

new
STATIC_URL = ‘/static/’

STATIC_ROOT = os.path.join(BASE_DIR, ‘static’)

Now it looks good , no idea how it works on Linux with old config 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s