eallrich / checkniner

Tracking and reporting of airstrip/aircraft checkout information for pilots.
MIT License
2 stars 5 forks source link

PilotWeight JSON file not always served up by whitenoise (404 status) #8

Closed eallrich closed 9 years ago

eallrich commented 9 years ago

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.

eallrich commented 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.

eallrich commented 9 years ago

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: