Skip to content

Commit 81851ff

Browse files
committed
Merge branch 'master' into mailgun_api_url
2 parents f6f2942 + 0965080 commit 81851ff

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

docs/settings.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ CELERY_BROKER_URL CELERY_BROKER_URL auto w/ Dock
4444
DJANGO_AWS_ACCESS_KEY_ID AWS_ACCESS_KEY_ID n/a raises error
4545
DJANGO_AWS_SECRET_ACCESS_KEY AWS_SECRET_ACCESS_KEY n/a raises error
4646
DJANGO_AWS_STORAGE_BUCKET_NAME AWS_STORAGE_BUCKET_NAME n/a raises error
47+
DJANGO_AWS_S3_REGION_NAME AWS_S3_REGION_NAME n/a None
4748
SENTRY_DSN SENTRY_DSN n/a raises error
4849
DJANGO_SENTRY_LOG_LEVEL SENTRY_LOG_LEVEL n/a logging.INFO
4950
MAILGUN_API_KEY MAILGUN_ACCESS_KEY n/a raises error

tests/test_docker.sh

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,17 @@ cd .cache/docker
1616
cookiecutter ../../ --no-input --overwrite-if-exists use_docker=y $@
1717
cd my_awesome_project
1818

19-
# run migrations
20-
docker-compose -f local.yml run django python manage.py migrate
19+
# run the project's type checks
20+
docker-compose -f local.yml run django mypy my_awesome_project
2121

22-
# view backups
23-
docker-compose -f local.yml exec postgres backups
22+
# Run black with --check option
23+
docker-compose -f local.yml run django black --check --diff --exclude 'migrations' ./
2424

25+
# run the project's tests
26+
docker-compose -f local.yml run django pytest
27+
28+
# return non-zero status code if there are migrations that have not been created
29+
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; }
30+
31+
# Test support for translations
32+
docker-compose -f local.yml run django python manage.py makemessages

{{cookiecutter.project_slug}}/config/settings/production.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@
8686
}
8787
# https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings
8888
AWS_DEFAULT_ACL = None
89+
# https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings
90+
AWS_S3_REGION_NAME = env("DJANGO_AWS_S3_REGION_NAME", default=None)
8991

9092
# STATIC
9193
# ------------------------

0 commit comments

Comments
 (0)