1

In my app, i am using a custom system for managing localization strings. In that connection, I have written a custom command that generates *.po files. However, after running that command, I have to manually call the compilemessages command. What I would like to do is to call the compilemessages command from my custom one. Is there a way to do that?

1 Answer 1

2

You can use call_command():

from django.core.management import call_command
# generate your *.po files, then
call_command('compilemessages')
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.