From d1bf4f48152ec00c3fbdd45888e4963e302f36e4 Mon Sep 17 00:00:00 2001 From: Jelmert Date: Tue, 2 Apr 2019 15:43:48 +0200 Subject: [PATCH 1/4] Added AWS_S3_REGION_NAME to production settings --- {{cookiecutter.project_slug}}/config/settings/production.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index 3db964b6..236c6c9f 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -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 # ------------------------ From 7e23327fe2c705b6e858bd6fbbc7b40e3b2e2e74 Mon Sep 17 00:00:00 2001 From: Jelmert Date: Tue, 2 Apr 2019 15:45:58 +0200 Subject: [PATCH 2/4] Added DJANG_AWS_S3_REGION_NAME to settings docs --- docs/settings.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/settings.rst b/docs/settings.rst index 705add87..212527cf 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -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 From d8271fae21cd8a15e8ec40cdd8825eb4081d208f Mon Sep 17 00:00:00 2001 From: Jelmert Date: Tue, 2 Apr 2019 15:47:18 +0200 Subject: [PATCH 3/4] Added myself to CONTRIBUTORS.rst --- CONTRIBUTORS.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 154fa1ac..9486b3a0 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -114,6 +114,7 @@ Listed in alphabetical order. Irfan Ahmad `@erfaan`_ @erfaan Jan Van Bruggen `@jvanbrug`_ Jens Nilsson `@phiberjenz`_ + Jelmer Draaijer `@foarsitter`_ Jerome Leclanche `@jleclanche`_ @Adys Jimmy Gitonga `@afrowave`_ @afrowave John Cass `@jcass77`_ @cass_john @@ -231,6 +232,7 @@ Listed in alphabetical order. .. _@eriol: https://github.com/eriol .. _@eyadsibai: https://github.com/eyadsibai .. _@flyudvik: https://github.com/flyudvik +.. _@foarsitter: https://github.com/foarsitter .. _@garry-cairns: https://github.com/garry-cairns .. _@garrypolley: https://github.com/garrypolley .. _@goldhand: https://github.com/goldhand From 1d420157c10f0c25839e186b0c1b13f6eb35fe1f Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Tue, 2 Apr 2019 15:10:14 +0100 Subject: [PATCH 4/4] Revert accidental commit --- tests/test_docker.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/tests/test_docker.sh b/tests/test_docker.sh index 018ad85f..55771c14 100755 --- a/tests/test_docker.sh +++ b/tests/test_docker.sh @@ -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