My static files are not being served. What I have verified:
settings.STATIC_ROOT
is properly defined:STATIC_ROOT = os.path.join(BASE_DIR, '..', 'collectstatic/')
settings.STATIC_URL
is properly defined:STATIC_URL = '/static/'
- I have done
python manage.py collectstatic
- The static files are indeed collected: my
collectstatic/
directory has the right assets - The
collectstatic/
directory is tracked in my git repo - I have pushed to the gae repo:
git push google
(I am not sure if gae is using the gae repo copy for staging, or my local repo) - When pushing to the gae repo, the assets are indeed present
- I have redeployed the app:
gcloud preview app deploy app.yaml --promote -q
- My
app.yaml
is properly configured, as explained here
Specifically:
handlers:
- url: /static
static_dir: collecstatic
- url: .*
script: myproj.wsgi.application
Still I get 404 for:
https://my-site.appspot.com/static/admin/css/base.css
Why could this be? What else can I verify?
EDIT
On The logging tab of the Google Cloud Platform I see warning messages:
Static file referenced by handler not found: collecstatic/admin/css/base.css
I would say all my settings are correct though.
How can I verify if my app instance has the right assets in the right places? Is there a way of checking the filesystem structure of a running instance?