This is on a production server with DEBUG = False. My static files will load on the home page but not the admin page. It gives me a error 404 in the browser console. This only happens on the admin page. I've checked to make sure that the .css files are in the specified directory's and they are along with the code inside them. NOTE: The same server and file structure was working earlier. I've tried almost everything I can think of any help would be greatly appreciated!
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static'),
)
STATIC_ROOT = '/home/django/django_project/django_project/static/'
STATIC_URL = '/static/'
I finally figured it out. I set the /static
in nginx config for django but not the path for /static/admin
. Thank you everyone for you help. Happy coding.