mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-24 02:24:07 +03:00
23 lines
305 B
Bash
23 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
|