What I am trying to achieve is when a django projects starts, have it run compilemessages automatically in a cross-platform way. That way the mo files don't need to be checked into source control, and when translations are added in branches and then merged back conflicts don't occur.

I'm having trouble with this because from what I gather, compilemessages depends on settings.py, so if you try to run it from settings.py it detects the circular reference and then doesn't run.

有帮助吗?

解决方案

As mentionned in this other question Subversion update hooks depend on the client, so i'd just suggest a shell script that does :

svn update
python manage.py compilemessages 

And you run this script when you want to deploy.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top