Closed eallrich closed 9 years ago
The above process for getting it working can be slimmed down: Disable the storage config, restart gunicorn, fetch /static/prefix_pilotweights.json, re-enable storage, and restart gunicorn again.
If the static files storage config issue isn't resolved, an alternative is to configure nginx to serve the pilotweights.json file specifically (similar to the existing /robots.txt and /favicon.ico directives).
Steps:
After creating the initial pilotweights.json file in STATIC_ROOT, it wasn't available at /static/prefix_pilotweights.json. Even after running collectstatic, the status was 404.
I turned off STATICFILES_STORAGE, ran collectstatic, restarted gunicorn, and then the file was reachable. I re-enabled STATICFILES_STORAGE, ran collecstatic again, and the exported file was still reachable. I also confirmed that I could see a new export file if I changed pilot weights.