Turns out there was a subtle problem with my settings.py
splitting method. For anyone coming here from Google, I was following deploydjango.com's and strategy on splitting settings.py
, however ROOT_DIR
was being defined in terms of the project, i.e. the following structure
$ tree -L 2
.
├── static
├── apps
└── project
├── __init__.py
├── settings
│ ├── __init__.py
│ ├── base.py
│ ├── dev.py
│ └── prod.py
├── urls.py
└── wsgi.py
with the following setting
STATICFILES_DIRS = (
ABS_PATH('apps', 'example_app', 'static'),
)
would result in ROOT_DIR
being set to project/
. And since ABS_PATH
function defines paths based on ROOT_DIR
, the apps/
folder is not visible (it should be preceded with '..'
).
The solution is of course to move apps/
folder inside the project/
folder, which makes sense. I.e. the correct structure is as follows:
$ tree -L 2
.
├── static
└── project_name
├── __init__.py
├── apps # <-- apps moved here
│ └── example_app
├── settings
│ ├── __init__.py
│ ├── base.py
│ ├── dev.py
│ └── prod.py
├── urls.py
└── wsgi.py
I realised this problem is very tied to the way I was doing things, however since this structure can be seen by some people as "best practice" (although some disagree), I hope this helps someone!