Open jezdez opened 7 years ago
I think this sounds amazing @jezdez - I haven't seen whitenoise before but it looks like a godsend. The whole code layout wasn't thought through well and any reorganization would be gratefully received.
@jezdez sounds awesome
I've already merged in whitenoise - i was already looking at ways to serve the static files from docker and this is perfect, thanks
There are a few things I've found while looking how Cabot organizes the static files:
I'd like to propose (and contribute) some steps that could simplify the setup:
cabot/static/js/<template-name>.js
, e.g.cabot/static/js/service-list.coffee
, which is included with a script tag incabot/templates/cabotapp/service_list.html
collectstatic
to trigger this whole thing in theDockerfile
to bake the static files into the image, fewer moving parts during deploymentI'm wondering if I'm missing something obvious, but I think this would be a big win for Cabot. In terms of reference that I can pull this off, I wrote django-staticfiles and co-wrote django-compressor. Please let me know if you're interested in that direction.