How to make heroku automatically start compiling messages the same way that collectstatic starts

python manage.py compilemessages

Creates compiled translation files with a name locale/en/LC_MESSAGES/django.mofrom the names of the source translation files, such as locale/en/LC_MESSAGES/django.po.

I would like the files to be *.moignored using git and not be tied to the repository, since they are not source files.

Geroku already knows how to

python manage.py collectstatic

for django projects.

How to make it execute compile messages?

I'm currently working on a problem by adding compilation result ( *.mo) files to my repository, but I would like to know if there is a better way.

(If necessary, a repo for my site: https://github.com/yairchu/vote_tool )

+4
1
  • : bin/post_compile
  • ./manage.py compilemessages
  • git push origin
  • git push heroku

Heroku, . , bin/post_compile , Heroku, , , collectstatic, compilemessages, --noinput, "", , .

+2

All Articles