Django admin site looks off

Hey, I’m making my 2nd Django site and I just accessed the admin site for the first time and it looks off. I’ve done collectstatic, I’ve done hard-refreshes, I’ve opened in different browsers, cleared cache, etc. Nothing will fix it, so I assume I somehow messed up something that is interfering with the proper CSS. Any suggestions…?

Some things you can check:

  • Check to see what JS and CSS files are being loaded - both as being shown in the browser and the requests on the server.

  • Check what version of Python and Django you’re using.

  • Try launching a bare-minimum site such as what you would have when starting the Django Tutorial.

I started out trying to launch a bare-minimum fresh Django project just to see and the admin site does appear to render properly

I’m using Python 3.14.3 and Django 6.0.2, both for this brand new project as well as the one that is rendering the admin site incorrectly. So I guess it must be some issue with my project specifically.

Okay as I am writing this I just finally figured it out. I honestly have no clue the mechanics of how this caused the issue, but what fixed it for me was deleting the “admin” folder located inside the “static” folder in my project directory (the same folder that has manage.py). I also have the “admin” folder located inside a “static” folder alongside my project directory, so I guess maybe having it in two places messed things up? But I really don’t know. Because it seems like in development, static files, at least admin static files, are served from outside the project entirely? Like from the Django’s installation directory or something. But it fixed it! So everything is rendering properly now.

That’s a good guess, but not correct.

You override system-provided files by supplying the replacement files in directories with the same subpaths as they exist in the system packages. So it’s quite possible that different apps override different system files - or even to override them at the project level. The only problem occurs when you’re overriding a file that you’re not intending to override.

(See Overriding Templates for more information on this.)

Also in a proper production deployment, all static files should be served from a directory that is outside your project. You use collectstatic to copy the files from your project and from installed packages to a single location from which they are served by your web server.

See How to manage static files (e.g. images, JavaScript, CSS) | Django documentation | Django for more information about this.

Got it, that makes sense. I do have the “static” folder outside of the project folder (the project folder and static folder are both in the same directory alongside each other), so when I run collectstatic is that also serving static files through that folder? Or only static files that I’ve made?

From the docs at The staticfiles app | Django documentation | Django :

The collectstatic command copies the static files to the directory specified by STATIC_ROOT.

It doesn’t serve any files, it only copies the files to a location from which they can be served.

Thank you! think I got it now