From 7ad879193782c2933722dfbcb3ea273a88aa62f1 Mon Sep 17 00:00:00 2001 From: Dani Hodovic Date: Wed, 21 Aug 2019 17:28:55 +0200 Subject: [PATCH 01/36] Remove EMAIL_HOST, EMAIL_PORT for console backend django.core.mail.backends.console.EmailBackend is an in memory backend so EMAIL_HOST and EMAIL_PORT does not need to be specified in this case. --- {{cookiecutter.project_slug}}/config/settings/local.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/local.py b/{{cookiecutter.project_slug}}/config/settings/local.py index bbc9ab35..2ab0a7cb 100644 --- a/{{cookiecutter.project_slug}}/config/settings/local.py +++ b/{{cookiecutter.project_slug}}/config/settings/local.py @@ -28,19 +28,19 @@ CACHES = { {% if cookiecutter.use_mailhog == 'y' and cookiecutter.use_docker == 'y' -%} # https://docs.djangoproject.com/en/dev/ref/settings/#email-host EMAIL_HOST = env("EMAIL_HOST", default="mailhog") +# https://docs.djangoproject.com/en/dev/ref/settings/#email-port +EMAIL_PORT = 1025 {%- elif cookiecutter.use_mailhog == 'y' and cookiecutter.use_docker == 'n' -%} # https://docs.djangoproject.com/en/dev/ref/settings/#email-host EMAIL_HOST = "localhost" +# https://docs.djangoproject.com/en/dev/ref/settings/#email-port +EMAIL_PORT = 1025 {%- else -%} # https://docs.djangoproject.com/en/dev/ref/settings/#email-backend EMAIL_BACKEND = env( "DJANGO_EMAIL_BACKEND", default="django.core.mail.backends.console.EmailBackend" ) -# https://docs.djangoproject.com/en/dev/ref/settings/#email-host -EMAIL_HOST = "localhost" {%- endif %} -# https://docs.djangoproject.com/en/dev/ref/settings/#email-port -EMAIL_PORT = 1025 # django-debug-toolbar # ------------------------------------------------------------------------------ From d4d8f1b5be114ce840ac863c4fdd725ebd436261 Mon Sep 17 00:00:00 2001 From: Dani Hodovic Date: Sun, 25 Aug 2019 14:08:28 +0200 Subject: [PATCH 02/36] Remove AWS_PRELOAD_METADATA https://github.com/antonagestam/collectfast/pull/140 --- {{cookiecutter.project_slug}}/config/settings/production.py | 1 - 1 file changed, 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index 214353de..e3741165 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -201,7 +201,6 @@ COMPRESS_URL = STATIC_URL{% if cookiecutter.use_whitenoise == 'y' or cookiecutte # ------------------------------------------------------------------------------ # https://github.com/antonagestam/collectfast#installation INSTALLED_APPS = ["collectfast"] + INSTALLED_APPS # noqa F405 -AWS_PRELOAD_METADATA = True {% endif %} # LOGGING # ------------------------------------------------------------------------------ From 180ab9bbb192fc0e648c67e52f3d7701792b552f Mon Sep 17 00:00:00 2001 From: Dani Hodovic Date: Mon, 26 Aug 2019 16:25:36 +0200 Subject: [PATCH 03/36] Remove redundant DEBUG = False in test.py This is already set to False by default in base.py --- {{cookiecutter.project_slug}}/config/settings/test.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/test.py b/{{cookiecutter.project_slug}}/config/settings/test.py index 89660a3f..fad41afd 100644 --- a/{{cookiecutter.project_slug}}/config/settings/test.py +++ b/{{cookiecutter.project_slug}}/config/settings/test.py @@ -7,8 +7,6 @@ from .base import env # GENERAL # ------------------------------------------------------------------------------ -# https://docs.djangoproject.com/en/dev/ref/settings/#debug -DEBUG = False # https://docs.djangoproject.com/en/dev/ref/settings/#secret-key SECRET_KEY = env( "DJANGO_SECRET_KEY", From 58a2262190a2025065ddedd09141a54883ac52b9 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Fri, 30 Aug 2019 13:00:28 +0200 Subject: [PATCH 04/36] Update django-allauth from 0.39.1 to 0.40.0 --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index f5c4f338..be85fb2e 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -22,7 +22,7 @@ flower==0.9.3 # https://github.com/mher/flower django==2.2.4 # pyup: < 3.0 # https://www.djangoproject.com/ django-environ==0.4.5 # https://github.com/joke2k/django-environ django-model-utils==3.2.0 # https://github.com/jazzband/django-model-utils -django-allauth==0.39.1 # https://github.com/pennersr/django-allauth +django-allauth==0.40.0 # https://github.com/pennersr/django-allauth django-crispy-forms==1.7.2 # https://github.com/django-crispy-forms/django-crispy-forms {%- if cookiecutter.use_compressor == "y" %} django-compressor==2.3 # https://github.com/django-compressor/django-compressor From c0554db343ed79197422a27e3d7da82fe20966c9 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Sat, 31 Aug 2019 13:00:33 +0200 Subject: [PATCH 05/36] Update sentry-sdk from 0.11.1 to 0.11.2 --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index eadd410d..1714398f 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -8,7 +8,7 @@ psycopg2==2.8.3 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 Collectfast==1.0.0 # https://github.com/antonagestam/collectfast {%- endif %} {%- if cookiecutter.use_sentry == "y" %} -sentry-sdk==0.11.1 # https://github.com/getsentry/sentry-python +sentry-sdk==0.11.2 # https://github.com/getsentry/sentry-python {%- endif %} # Django From df36bf1f550a95103def6b667f5de893867fc0db Mon Sep 17 00:00:00 2001 From: browniebroke Date: Mon, 2 Sep 2019 12:00:29 +0100 Subject: [PATCH 06/36] Update django from 2.2.4 to 2.2.5 --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index f5c4f338..170a888f 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -19,7 +19,7 @@ flower==0.9.3 # https://github.com/mher/flower # Django # ------------------------------------------------------------------------------ -django==2.2.4 # pyup: < 3.0 # https://www.djangoproject.com/ +django==2.2.5 # pyup: < 3.0 # https://www.djangoproject.com/ django-environ==0.4.5 # https://github.com/joke2k/django-environ django-model-utils==3.2.0 # https://github.com/jazzband/django-model-utils django-allauth==0.39.1 # https://github.com/pennersr/django-allauth From 7fd095a926f9768ecdd11732ff17156e55345248 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Tue, 3 Sep 2019 21:17:42 -0700 Subject: [PATCH 07/36] Update tox from 3.13.2 to 3.14.0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 2f85a700..b9cff303 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,7 +9,7 @@ flake8==3.7.8 # Testing # ------------------------------------------------------------------------------ -tox==3.13.2 +tox==3.14.0 pytest==5.1.1 pytest_cases==1.11.1 pytest-cookies==0.4.0 From c6bd37adcc51f2c22cb06bf8d504163da01fc803 Mon Sep 17 00:00:00 2001 From: Dani Hodovic Date: Wed, 4 Sep 2019 15:58:20 +0200 Subject: [PATCH 08/36] Add default tests.py file pattern to pytest `./manage.py startapp` generates a tests.py file by default. This is ignored by pytest unless specified. --- {{cookiecutter.project_slug}}/pytest.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/{{cookiecutter.project_slug}}/pytest.ini b/{{cookiecutter.project_slug}}/pytest.ini index 9fb488cb..52b48ab0 100644 --- a/{{cookiecutter.project_slug}}/pytest.ini +++ b/{{cookiecutter.project_slug}}/pytest.ini @@ -1,5 +1,6 @@ [pytest] addopts = --ds=config.settings.test +python_files = tests.py test_*.py {%- if cookiecutter.js_task_runner != 'None' %} norecursedirs = node_modules {%- endif %} From 1c98ff011b212ad385699fe5d437bac41f130a0b Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 4 Sep 2019 11:05:03 -0700 Subject: [PATCH 09/36] Update pytest from 5.1.1 to 5.1.2 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index b9cff303..4e265809 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,7 @@ flake8==3.7.8 # Testing # ------------------------------------------------------------------------------ tox==3.14.0 -pytest==5.1.1 +pytest==5.1.2 pytest_cases==1.11.1 pytest-cookies==0.4.0 pytest-xdist==1.29.0 From f1a04205e70bf7a4bbe14968839207ad05a7edcf Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Wed, 4 Sep 2019 19:08:56 +0100 Subject: [PATCH 10/36] Update pytest from 5.1.1 to 5.1.2 --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 0a417575..c1df0b84 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -12,7 +12,7 @@ psycopg2-binary==2.8.3 # https://github.com/psycopg/psycopg2 # Testing # ------------------------------------------------------------------------------ mypy==0.720 # https://github.com/python/mypy -pytest==5.1.1 # https://github.com/pytest-dev/pytest +pytest==5.1.2 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.2 # https://github.com/Frozenball/pytest-sugar # Code quality From c29795b1dc7e2d125bf07b027b88a2d853fb9966 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Thu, 5 Sep 2019 13:00:31 +0200 Subject: [PATCH 11/36] Update djangorestframework from 3.10.2 to 3.10.3 --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 3fe638e6..24198e55 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -30,5 +30,5 @@ django-compressor==2.3 # https://github.com/django-compressor/django-compressor django-redis==4.10.0 # https://github.com/niwinz/django-redis # Django REST Framework -djangorestframework==3.10.2 # https://github.com/encode/django-rest-framework +djangorestframework==3.10.3 # https://github.com/encode/django-rest-framework coreapi==2.3.3 # https://github.com/core-api/python-client From 69566f54561cd5f7d0f7954a0423d4ad759337d6 Mon Sep 17 00:00:00 2001 From: Dani Hodovic Date: Thu, 22 Aug 2019 14:57:00 +0200 Subject: [PATCH 12/36] Add context processor for settings variables This allows for usage of settings variables in templates, e.g ``` {% if settings.USE_ANALYTICS %} {% endif %} ``` --- {{cookiecutter.project_slug}}/config/settings/base.py | 1 + .../{{cookiecutter.project_slug}}/utils/__init__.py | 0 .../utils/context_processors.py | 5 +++++ 3 files changed, 6 insertions(+) create mode 100644 {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/utils/__init__.py create mode 100644 {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/utils/context_processors.py diff --git a/{{cookiecutter.project_slug}}/config/settings/base.py b/{{cookiecutter.project_slug}}/config/settings/base.py index 7def8f48..41f0f46c 100644 --- a/{{cookiecutter.project_slug}}/config/settings/base.py +++ b/{{cookiecutter.project_slug}}/config/settings/base.py @@ -187,6 +187,7 @@ TEMPLATES = [ "django.template.context_processors.static", "django.template.context_processors.tz", "django.contrib.messages.context_processors.messages", + "{{ cookiecutter.project_slug }}.utils.context_processors.settings_context", ], }, } diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/utils/__init__.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/utils/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/utils/context_processors.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/utils/context_processors.py new file mode 100644 index 00000000..de405076 --- /dev/null +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/utils/context_processors.py @@ -0,0 +1,5 @@ +from django.conf import settings + + +def settings_context(_request): + return {"settings": settings} From fb3d4ff25ceb4bb01f0fdb4f40d739435962097d Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Thu, 5 Sep 2019 08:35:31 -0700 Subject: [PATCH 13/36] Update pytest_cases from 1.11.1 to 1.11.2 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index b9cff303..c7652899 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,7 +11,7 @@ flake8==3.7.8 # ------------------------------------------------------------------------------ tox==3.14.0 pytest==5.1.1 -pytest_cases==1.11.1 +pytest_cases==1.11.2 pytest-cookies==0.4.0 pytest-xdist==1.29.0 pyyaml==5.1.2 From e5f9dd2c783a6ec63d7b606e8b5cb6b9d3c0eb3c Mon Sep 17 00:00:00 2001 From: browniebroke Date: Sun, 8 Sep 2019 13:00:29 +0200 Subject: [PATCH 14/36] Update django-anymail from 6.1.0 to 7.0.0 --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 1714398f..1863a493 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -18,4 +18,4 @@ django-storages[boto3]==1.7.1 # https://github.com/jschneier/django-storages {%- elif cookiecutter.cloud_provider == 'GCP' %} django-storages[google]==1.7.1 # https://github.com/jschneier/django-storages {%- endif %} -django-anymail[mailgun]==6.1.0 # https://github.com/anymail/django-anymail +django-anymail[mailgun]==7.0.0 # https://github.com/anymail/django-anymail From db777571c457a92d85cbe08d2de12b06f3fede30 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Tue, 10 Sep 2019 13:00:29 +0200 Subject: [PATCH 15/36] Update django-storages from 1.7.1 to 1.7.2 --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 1714398f..379281ab 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -14,7 +14,7 @@ sentry-sdk==0.11.2 # https://github.com/getsentry/sentry-python # Django # ------------------------------------------------------------------------------ {%- if cookiecutter.cloud_provider == 'AWS' %} -django-storages[boto3]==1.7.1 # https://github.com/jschneier/django-storages +django-storages[boto3]==1.7.2 # https://github.com/jschneier/django-storages {%- elif cookiecutter.cloud_provider == 'GCP' %} django-storages[google]==1.7.1 # https://github.com/jschneier/django-storages {%- endif %} From fab5bf8a040b9d3467581bfadbb1eee4f97bcf56 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Tue, 10 Sep 2019 13:00:30 +0200 Subject: [PATCH 16/36] Update django-storages from 1.7.1 to 1.7.2 --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 379281ab..5b1387e2 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -16,6 +16,6 @@ sentry-sdk==0.11.2 # https://github.com/getsentry/sentry-python {%- if cookiecutter.cloud_provider == 'AWS' %} django-storages[boto3]==1.7.2 # https://github.com/jschneier/django-storages {%- elif cookiecutter.cloud_provider == 'GCP' %} -django-storages[google]==1.7.1 # https://github.com/jschneier/django-storages +django-storages[google]==1.7.2 # https://github.com/jschneier/django-storages {%- endif %} django-anymail[mailgun]==6.1.0 # https://github.com/anymail/django-anymail From f8963e0dd3935ebaff8614c4bde2af04f8e208c0 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Thu, 19 Sep 2019 12:00:30 +0100 Subject: [PATCH 17/36] Update sentry-sdk from 0.11.2 to 0.12.0 --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 5b1387e2..a602a700 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -8,7 +8,7 @@ psycopg2==2.8.3 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 Collectfast==1.0.0 # https://github.com/antonagestam/collectfast {%- endif %} {%- if cookiecutter.use_sentry == "y" %} -sentry-sdk==0.11.2 # https://github.com/getsentry/sentry-python +sentry-sdk==0.12.0 # https://github.com/getsentry/sentry-python {%- endif %} # Django From ce3547e890459323d9fbfd3c7c9a4b5e3331b1e2 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Sat, 21 Sep 2019 12:00:30 +0100 Subject: [PATCH 18/36] Update sentry-sdk from 0.12.0 to 0.12.2 --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index a602a700..6dd36371 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -8,7 +8,7 @@ psycopg2==2.8.3 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 Collectfast==1.0.0 # https://github.com/antonagestam/collectfast {%- endif %} {%- if cookiecutter.use_sentry == "y" %} -sentry-sdk==0.12.0 # https://github.com/getsentry/sentry-python +sentry-sdk==0.12.2 # https://github.com/getsentry/sentry-python {%- endif %} # Django From 02689f67e74c5117933174b374b4f6b02f91c80d Mon Sep 17 00:00:00 2001 From: browniebroke Date: Sat, 21 Sep 2019 12:00:33 +0100 Subject: [PATCH 19/36] Update python-slugify from 3.0.3 to 3.0.4 --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 24198e55..ae16b0e8 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -1,5 +1,5 @@ pytz==2019.2 # https://github.com/stub42/pytz -python-slugify==3.0.3 # https://github.com/un33k/python-slugify +python-slugify==3.0.4 # https://github.com/un33k/python-slugify Pillow==6.1.0 # https://github.com/python-pillow/Pillow {%- if cookiecutter.use_compressor == "y" %} rcssmin==1.0.6{% if cookiecutter.windows == 'y' and cookiecutter.use_docker == 'n' %} --install-option="--without-c-extensions"{% endif %} # https://github.com/ndparker/rcssmin From 26ecff778e5bb61e52fb58bff6a745e381e8dae9 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sun, 22 Sep 2019 00:50:31 -0700 Subject: [PATCH 20/36] Update pytest from 5.1.2 to 5.1.3 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index f4d12375..a4eb4a53 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,7 @@ flake8==3.7.8 # Testing # ------------------------------------------------------------------------------ tox==3.14.0 -pytest==5.1.2 +pytest==5.1.3 pytest_cases==1.11.2 pytest-cookies==0.4.0 pytest-xdist==1.29.0 From aa573427948b4cd25c9db74174953fc48b88f732 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Mon, 23 Sep 2019 12:00:28 +0100 Subject: [PATCH 21/36] Update pytest from 5.1.2 to 5.1.3 --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index c1df0b84..2b221294 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -12,7 +12,7 @@ psycopg2-binary==2.8.3 # https://github.com/psycopg/psycopg2 # Testing # ------------------------------------------------------------------------------ mypy==0.720 # https://github.com/python/mypy -pytest==5.1.2 # https://github.com/pytest-dev/pytest +pytest==5.1.3 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.2 # https://github.com/Frozenball/pytest-sugar # Code quality From e924a55d7875ea992104b0440f2eda6c725bcb37 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Wed, 25 Sep 2019 12:00:29 +0100 Subject: [PATCH 22/36] Update whitenoise from 4.1.3 to 4.1.4 --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index ae16b0e8..e2871f71 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -6,7 +6,7 @@ rcssmin==1.0.6{% if cookiecutter.windows == 'y' and cookiecutter.use_docker == ' {%- endif %} argon2-cffi==19.1.0 # https://github.com/hynek/argon2_cffi {%- if cookiecutter.use_whitenoise == 'y' %} -whitenoise==4.1.3 # https://github.com/evansd/whitenoise +whitenoise==4.1.4 # https://github.com/evansd/whitenoise {%- endif %} redis==3.3.8 # https://github.com/antirez/redis {%- if cookiecutter.use_celery == "y" %} From 9e5343dd31d64e3eea45e1d19dc944fe7f29cb8c Mon Sep 17 00:00:00 2001 From: browniebroke Date: Fri, 27 Sep 2019 12:00:30 +0100 Subject: [PATCH 23/36] Update mypy from 0.720 to 0.730 --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 2b221294..a96d64b4 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -11,7 +11,7 @@ psycopg2-binary==2.8.3 # https://github.com/psycopg/psycopg2 # Testing # ------------------------------------------------------------------------------ -mypy==0.720 # https://github.com/python/mypy +mypy==0.730 # https://github.com/python/mypy pytest==5.1.3 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.2 # https://github.com/Frozenball/pytest-sugar From d6b0bf8bb08769fb9cdf2e1d0a4b2a4a9a76de5c Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 30 Sep 2019 00:04:00 -0700 Subject: [PATCH 24/36] Update pytest from 5.1.3 to 5.2.0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index a4eb4a53..27787f52 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,7 @@ flake8==3.7.8 # Testing # ------------------------------------------------------------------------------ tox==3.14.0 -pytest==5.1.3 +pytest==5.2.0 pytest_cases==1.11.2 pytest-cookies==0.4.0 pytest-xdist==1.29.0 From 4aed40d74d7a003037c55a255cede4d0a901716f Mon Sep 17 00:00:00 2001 From: browniebroke Date: Tue, 1 Oct 2019 12:00:29 +0100 Subject: [PATCH 25/36] Update django from 2.2.5 to 2.2.6 --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index e2871f71..a7620e3c 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -19,7 +19,7 @@ flower==0.9.3 # https://github.com/mher/flower # Django # ------------------------------------------------------------------------------ -django==2.2.5 # pyup: < 3.0 # https://www.djangoproject.com/ +django==2.2.6 # pyup: < 3.0 # https://www.djangoproject.com/ django-environ==0.4.5 # https://github.com/joke2k/django-environ django-model-utils==3.2.0 # https://github.com/jazzband/django-model-utils django-allauth==0.40.0 # https://github.com/pennersr/django-allauth From 7b73c2eb920b4979f42c284072e9de543889bd05 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Tue, 1 Oct 2019 12:00:33 +0100 Subject: [PATCH 26/36] Update pytest from 5.1.3 to 5.2.0 --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index a96d64b4..fd2f4eb3 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -12,7 +12,7 @@ psycopg2-binary==2.8.3 # https://github.com/psycopg/psycopg2 # Testing # ------------------------------------------------------------------------------ mypy==0.730 # https://github.com/python/mypy -pytest==5.1.3 # https://github.com/pytest-dev/pytest +pytest==5.2.0 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.2 # https://github.com/Frozenball/pytest-sugar # Code quality From da15657224b08e5cb026863b7dc35b596e62db4c Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Tue, 1 Oct 2019 08:29:41 -0700 Subject: [PATCH 27/36] Update pytest_cases from 1.11.2 to 1.11.3 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 27787f52..a93b75a3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,7 +11,7 @@ flake8==3.7.8 # ------------------------------------------------------------------------------ tox==3.14.0 pytest==5.2.0 -pytest_cases==1.11.2 +pytest_cases==1.11.3 pytest-cookies==0.4.0 pytest-xdist==1.29.0 pyyaml==5.1.2 From 0e5902027e86eef7886ffcf31ae0c98ba3007506 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Tue, 1 Oct 2019 15:06:58 -0700 Subject: [PATCH 28/36] Update pytest-xdist from 1.29.0 to 1.30.0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index a93b75a3..e9d2afb2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,5 +13,5 @@ tox==3.14.0 pytest==5.2.0 pytest_cases==1.11.3 pytest-cookies==0.4.0 -pytest-xdist==1.29.0 +pytest-xdist==1.30.0 pyyaml==5.1.2 From daa0265a39ab9b6e5a52a82c3d02dd7831713c89 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Wed, 2 Oct 2019 12:00:29 +0100 Subject: [PATCH 29/36] Update pillow from 6.1.0 to 6.2.0 --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index a7620e3c..d0bce155 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -1,6 +1,6 @@ pytz==2019.2 # https://github.com/stub42/pytz python-slugify==3.0.4 # https://github.com/un33k/python-slugify -Pillow==6.1.0 # https://github.com/python-pillow/Pillow +Pillow==6.2.0 # https://github.com/python-pillow/Pillow {%- if cookiecutter.use_compressor == "y" %} rcssmin==1.0.6{% if cookiecutter.windows == 'y' and cookiecutter.use_docker == 'n' %} --install-option="--without-c-extensions"{% endif %} # https://github.com/ndparker/rcssmin {%- endif %} From 8a471c97e8df910f6762b7dc257cf6ec1e867833 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Wed, 2 Oct 2019 12:00:33 +0100 Subject: [PATCH 30/36] Update django-extensions from 2.2.1 to 2.2.2 --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index fd2f4eb3..1f5d7a54 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -30,6 +30,6 @@ pylint-celery==0.3 # https://github.com/PyCQA/pylint-celery factory-boy==2.12.0 # https://github.com/FactoryBoy/factory_boy django-debug-toolbar==2.0 # https://github.com/jazzband/django-debug-toolbar -django-extensions==2.2.1 # https://github.com/django-extensions/django-extensions +django-extensions==2.2.2 # https://github.com/django-extensions/django-extensions django-coverage-plugin==1.6.0 # https://github.com/nedbat/django_coverage_plugin pytest-django==3.5.1 # https://github.com/pytest-dev/pytest-django From 8e1211580f0fbc77dd3394c4c6b91913a45d8c44 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Wed, 2 Oct 2019 13:39:16 +0100 Subject: [PATCH 31/36] Create FUNDING.yml --- .github/FUNDING.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..9f4c97f3 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: danielroygreenfeld +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: ['https://www.patreon.com/browniebroke'] From d0c208d10fcd335b7b37a6a05d4d8ee72b995793 Mon Sep 17 00:00:00 2001 From: Caio Ariede Date: Wed, 2 Oct 2019 12:03:33 -0300 Subject: [PATCH 32/36] Fix #2249 -- Broken static files with whitenoise=n & cloud_provider=none --- hooks/pre_gen_project.py | 9 +++++++++ tests/test_cookiecutter_generation.py | 12 ++++++++++++ 2 files changed, 21 insertions(+) diff --git a/hooks/pre_gen_project.py b/hooks/pre_gen_project.py index 91332f14..7f9bd3ea 100644 --- a/hooks/pre_gen_project.py +++ b/hooks/pre_gen_project.py @@ -59,3 +59,12 @@ if "{{ cookiecutter.use_docker }}".lower() == "n": ) + TERMINATOR ) + +if ( + "{{ cookiecutter.use_whitenoise }}".lower() == "n" + and "{{ cookiecutter.cloud_provider }}" == "None" +): + print( + "You should either use Whitenoise or select a Cloud Provider to serve static files" + ) + sys.exit(1) diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py index 77f71df5..dc729513 100755 --- a/tests/test_cookiecutter_generation.py +++ b/tests/test_cookiecutter_generation.py @@ -49,6 +49,11 @@ def context_combination( cloud_provider, ): """Fixture that parametrize the function where it's used.""" + if cloud_provider == "None": + # Either of the two should be set for serving static files, so if cloud provider + # is not set, we force Whitenoise to be set + use_whitenoise = "y" + return { "windows": windows, "use_docker": use_docker, @@ -157,3 +162,10 @@ def test_invalid_slug(cookies, context, slug): assert result.exit_code != 0 assert isinstance(result.exception, FailedHookException) + + +def test_no_whitenoise_and_no_cloud_provider(cookies, context): + context.update({"use_whitenoise": "n", "cloud_provider": "None"}) + result = cookies.bake(extra_context=context) + + assert result.exit_code == 1 From 9fffafc0950e214db263be797249005c35ef7db7 Mon Sep 17 00:00:00 2001 From: Caio Ariede Date: Wed, 2 Oct 2019 12:06:53 -0300 Subject: [PATCH 33/36] Add docstring --- tests/test_cookiecutter_generation.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py index dc729513..b02bba36 100755 --- a/tests/test_cookiecutter_generation.py +++ b/tests/test_cookiecutter_generation.py @@ -165,6 +165,7 @@ def test_invalid_slug(cookies, context, slug): def test_no_whitenoise_and_no_cloud_provider(cookies, context): + """It should not generate project if neither whitenoise or cloud provider are set""" context.update({"use_whitenoise": "n", "cloud_provider": "None"}) result = cookies.bake(extra_context=context) From 6e27a8beac7fcf02221041d5dec88ca314dc5452 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Thu, 3 Oct 2019 12:00:31 +0100 Subject: [PATCH 34/36] Update sentry-sdk from 0.12.2 to 0.12.3 --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 0d74f6d1..46c1a89e 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -8,7 +8,7 @@ psycopg2==2.8.3 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 Collectfast==1.0.0 # https://github.com/antonagestam/collectfast {%- endif %} {%- if cookiecutter.use_sentry == "y" %} -sentry-sdk==0.12.2 # https://github.com/getsentry/sentry-python +sentry-sdk==0.12.3 # https://github.com/getsentry/sentry-python {%- endif %} # Django From 9f1821cadfae6a9782fb92e7d044f197413e0833 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Thu, 3 Oct 2019 12:00:34 +0100 Subject: [PATCH 35/36] Update django-extensions from 2.2.2 to 2.2.3 --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 1f5d7a54..41813c47 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -30,6 +30,6 @@ pylint-celery==0.3 # https://github.com/PyCQA/pylint-celery factory-boy==2.12.0 # https://github.com/FactoryBoy/factory_boy django-debug-toolbar==2.0 # https://github.com/jazzband/django-debug-toolbar -django-extensions==2.2.2 # https://github.com/django-extensions/django-extensions +django-extensions==2.2.3 # https://github.com/django-extensions/django-extensions django-coverage-plugin==1.6.0 # https://github.com/nedbat/django_coverage_plugin pytest-django==3.5.1 # https://github.com/pytest-dev/pytest-django From 4f8834c0ebcf67d55fa8ed74b753ab665440d7b4 Mon Sep 17 00:00:00 2001 From: Caio Ariede Date: Thu, 3 Oct 2019 11:54:15 -0300 Subject: [PATCH 36/36] Update tests/test_cookiecutter_generation.py Co-Authored-By: Bruno Alla --- tests/test_cookiecutter_generation.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py index b02bba36..20e4f9ed 100755 --- a/tests/test_cookiecutter_generation.py +++ b/tests/test_cookiecutter_generation.py @@ -169,4 +169,5 @@ def test_no_whitenoise_and_no_cloud_provider(cookies, context): context.update({"use_whitenoise": "n", "cloud_provider": "None"}) result = cookies.bake(extra_context=context) - assert result.exit_code == 1 + assert result.exit_code != 0 + assert isinstance(result.exception, FailedHookException)