

When DEBUG is enabled Django uses STATICFILES_FINDERS option that by default is: [ Since you have '' in your apps list, Django actually does NOT load files from STATIC_ROOT when DEBUG is True.

Path('ckeditor', include('ckeditor_uploader.urls')), MEDIA_ROOT = os.path.join(BASE_DIR, 'media')įrom import static STATIC_ROOT = os.path.join(BASE_DIR, 'static') In an effort to help anyone debug my problem, here are some relevant excerpts files:īASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(_file_))) This is to be expected though, since in development I don't have a web server to handle this (to clarify, I usually run the server in debug mode, but have tried turning this setting off and on to see what changes occur) Running with DEBUG=False works fine in production (all the static files load) but no static files load at all when DEBUG=False in development.I have run collectstatic in both environments.I am using the template tag and I've tried that too.I have routed media in much the same way (see the settings file below) and that works fine in development.It works fine in production! I assumed this was because I had dedicated aliases in my apache config, but that doesn't explain why admin and ckeditor work.Here's some other information which may be of interest:

Here's an example from the runserver output in debug mode (the file at static/css/base.css exists in my file tree): GET /static/ckeditor/ckeditor/ckeditor.js HTTP/1.1" 200 690627 Here's a map of my directory: rootĪs stated, ckeditor and admin load fine while the others do not. In my development environment my Django app will not load some of my static files, specifically ones that I have added myself: that is, the two packages I've added to my app ( admin and ckeditor) are both loading up fine, but two of the folders I've created and linked myself ( img and css) are not being found. Usually I have this issue exactly the other way around!
