Wednesday, October 19, 2022

[FIXED] Why does my Django admin site not have styles / CSS loading?

Issue

I made a Django admin site using Django development version but it isn't being styled:

alt text


Solution

Django does not serve static files on it's own. You have to tell it where the files are.

The ADMIN_MEDIA_PREFIX in the settings.py will point Django in the right location.

Since you're using the development version, you'll want the dev-specific document for static files how-to. Adam's link will lead you to the 1.2 version.



Answered By - Evan Porter
Answer Checked By - Dawn Plyler (PHPFixing Volunteer)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.