I am deploying a Django application inside a DigitalOcean App, everything is working fine except Django translations.
I check my ~/locale/en/LC_MESSAGES$
and see only my django.po
file. I need to generate the .mo
file. But how can I run the command django-admin compilemessages
from the console? I need the virtual environment, right?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hello,
App Platform checks your code to determine what language or framework it uses. If it supports the language or framework, it chooses an appropriate resource type and uses the proper buildpack to build the app and deploy a container.
heroku-buildpack-python is utilized as the buildpack for detecting and building your Python applications.
What you can do is, open your requirements.txt file. If you don’t have one, create it. Add the following line:
This will add the
gettext
package to the list of requirements that DigitalOcean App will install when deploying your application.During the deployment process, DigitalOcean App will automatically download and install the
gettext
package, which includes themsgfmt
command required to compile the translation files.