Merge branch 'master' into mailgun_api_url

This commit is contained in:
Bruno Alla 2019-04-02 15:45:37 +01:00
commit 81851ffb6d
3 changed files with 15 additions and 4 deletions

View File

@ -44,6 +44,7 @@ CELERY_BROKER_URL CELERY_BROKER_URL auto w/ Dock
DJANGO_AWS_ACCESS_KEY_ID AWS_ACCESS_KEY_ID n/a raises error
DJANGO_AWS_SECRET_ACCESS_KEY AWS_SECRET_ACCESS_KEY n/a raises error
DJANGO_AWS_STORAGE_BUCKET_NAME AWS_STORAGE_BUCKET_NAME n/a raises error
DJANGO_AWS_S3_REGION_NAME AWS_S3_REGION_NAME n/a None
SENTRY_DSN SENTRY_DSN n/a raises error
DJANGO_SENTRY_LOG_LEVEL SENTRY_LOG_LEVEL n/a logging.INFO
MAILGUN_API_KEY MAILGUN_ACCESS_KEY n/a raises error

View File

@ -16,9 +16,17 @@ cd .cache/docker
cookiecutter ../../ --no-input --overwrite-if-exists use_docker=y $@
cd my_awesome_project
# run migrations
docker-compose -f local.yml run django python manage.py migrate
# run the project's type checks
docker-compose -f local.yml run django mypy my_awesome_project
# view backups
docker-compose -f local.yml exec postgres backups
# Run black with --check option
docker-compose -f local.yml run django black --check --diff --exclude 'migrations' ./
# run the project's tests
docker-compose -f local.yml run django pytest
# return non-zero status code if there are migrations that have not been created
docker-compose -f local.yml run django python manage.py makemigrations --dry-run --check || { echo "ERROR: there were changes in the models, but migration listed above have not been created and are not saved in version control"; exit 1; }
# Test support for translations
docker-compose -f local.yml run django python manage.py makemessages

View File

@ -86,6 +86,8 @@ AWS_S3_OBJECT_PARAMETERS = {
}
# https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings
AWS_DEFAULT_ACL = None
# https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings
AWS_S3_REGION_NAME = env("DJANGO_AWS_S3_REGION_NAME", default=None)
# STATIC
# ------------------------