Problem with unusual deployment with Django and CoffeeScript for Heroku

This is kind of a difficult question, so a little explanation is needed. I am not looking for a direct answer, so any advice would be good. I have a Django application that uses a lot of CoffeeScript. To compile CoffeeScript in a project, I use the django-compressor application. To use django-compressor , I need to install nmp (node ​​package manager). Unfortunately, I cannot install npm on Heroku. Thus, I need to compile CoffeeScript before it gets to Heroku servers. So I did this by setting up Fabric , which seems to work fine.

I ran into no problem because I can get the compiled CoffeeScript as a static file, but the templates still have the tags {% compress js %} *** {% endcompress %} , because django-compressor does not restore new templates to time fulfillment.

So I'm looking for advice on how to deploy the application in order to access the template tags so that the application can be deployed to Heroku. I know this is a question with lots of parts, so any advice would be very helpful!

+4
source share
2 answers
+3
source

you can also commit the manifest.json file that the django compressor generates (I assume you are using it offline) and then it will know which template blocks are sent to the compiled js / css files

0
source

Source: https://habr.com/ru/post/1397767/


All Articles