Cannot get static files for admin to work Cannot get static files for admin to work apache apache

Cannot get static files for admin to work


It looks like the request for admin app's static file is hitting Django app. I assume your URLs are defined properly, but it is worth rechecking with Django static files configuration.

As seen in the documentation on static files:

Serving the files

In addition to these configuration steps, you’ll also need to actually serve the static files.

During development, this will be done automatically if you use runserver and DEBUG is set to True (see django.contrib.staticfiles.views.serve()).

This method is grossly inefficient and probably insecure, so it is unsuitable for production.

See Deploying static files for proper strategies to serve static files in production environments.

It means, that you need to setup your web server (eg. Apache) to serve static files outside Django (so the request to this URL should not even reach Django app).

Also make sure you have invoked collectstatic.