mirror of
https://github.com/Hopiu/cookiecutter-django.git
synced 2026-04-10 16:20:59 +00:00
22 lines
305 B
Bash
22 lines
305 B
Bash
#!/usr/bin/env bash
|
|
|
|
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
|
|
python manage.py collectstatic --noinput
|