mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-30 05:24:01 +03:00
2e561ed6c4
* Update readme on internationalization * Run compilemessages when building production image * Run compilemessages when deploying to Heroku * Always keep Heroku post-compile hooks * Add empty po file for en-US language * Update instructions for Docker * Update default po file * Convert locale readme to markdown and expand a bit the instructions * Don't compile translations for 3rd party packages * Use simplified settings & set env variables for compiling translations * Update README for translations * Improve metadata for Brazilian Portuguese translations * Fix condition for django compressor on Heroku * Fix condition for Django Compressor
27 lines
433 B
Bash
27 lines
433 B
Bash
#!/usr/bin/env bash
|
|
{%- if cookiecutter.frontend_pipeline == "Django Compressor" %}
|
|
|
|
compress_enabled() {
|
|
python << END
|
|
import sys
|
|
|
|
from environ import Env
|
|
|
|
env = Env(COMPRESS_ENABLED=(bool, True))
|
|
if env('COMPRESS_ENABLED'):
|
|
sys.exit(0)
|
|
else:
|
|
sys.exit(1)
|
|
|
|
END
|
|
}
|
|
|
|
if compress_enabled
|
|
then
|
|
python manage.py compress
|
|
fi
|
|
{%- endif %}
|
|
|
|
python manage.py collectstatic --noinput
|
|
python manage.py compilemessages -i site-packages
|