From 69566f54561cd5f7d0f7954a0423d4ad759337d6 Mon Sep 17 00:00:00 2001 From: Dani Hodovic Date: Thu, 22 Aug 2019 14:57:00 +0200 Subject: [PATCH 001/146] 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 e5f9dd2c783a6ec63d7b606e8b5cb6b9d3c0eb3c Mon Sep 17 00:00:00 2001 From: browniebroke Date: Sun, 8 Sep 2019 13:00:29 +0200 Subject: [PATCH 002/146] 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 003/146] 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 004/146] 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 005/146] 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 006/146] 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 007/146] 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 008/146] 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 009/146] 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 010/146] 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 011/146] 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 7d0f8606edadc082b5f49e5c50af823a80e8b246 Mon Sep 17 00:00:00 2001 From: Nicolas Stefani Date: Sun, 29 Sep 2019 09:41:13 -0300 Subject: [PATCH 012/146] Update python image to 3.7 --- {{cookiecutter.project_slug}}/compose/local/django/Dockerfile | 2 +- .../compose/production/django/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile index 67937822..a98547bd 100644 --- a/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.6-alpine +FROM python:3.7-alpine ENV PYTHONUNBUFFERED 1 diff --git a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile index 37f66ec7..b0861d60 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile @@ -9,7 +9,7 @@ RUN npm run build # Python build stage {%- endif %} -FROM python:3.6-alpine +FROM python:3.7-alpine ENV PYTHONUNBUFFERED 1 From 1f68e370eef449e0419a425fa4adbd5869a17513 Mon Sep 17 00:00:00 2001 From: Nicolas Stefani Date: Sun, 29 Sep 2019 21:04:21 -0300 Subject: [PATCH 013/146] Updated python version to 3.7 --- .travis.yml | 4 ++-- tox.ini | 2 +- {{cookiecutter.project_slug}}/.travis.yml | 2 +- {{cookiecutter.project_slug}}/runtime.txt | 2 +- {{cookiecutter.project_slug}}/setup.cfg | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index c2bcdf42..925d82e7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ services: language: python -python: 3.6 +python: 3.7 before_install: - docker-compose -v @@ -14,7 +14,7 @@ before_install: matrix: include: - name: Test results - script: tox -e py36 + script: tox -e py37 - name: Run flake8 on result script: tox -e flake8 - name: Run black on result diff --git a/tox.ini b/tox.ini index 7ee93915..1c83465c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] skipsdist = true -envlist = py36,flake8,black,black-template +envlist = py37,flake8,black,black-template [testenv] deps = -rrequirements.txt diff --git a/{{cookiecutter.project_slug}}/.travis.yml b/{{cookiecutter.project_slug}}/.travis.yml index 2d86ac31..31695e41 100644 --- a/{{cookiecutter.project_slug}}/.travis.yml +++ b/{{cookiecutter.project_slug}}/.travis.yml @@ -10,7 +10,7 @@ before_install: - sudo apt-get install -qq libsqlite3-dev libxml2 libxml2-dev libssl-dev libbz2-dev wget curl llvm language: python python: - - "3.6" + - "3.7" install: - pip install -r requirements/local.txt script: diff --git a/{{cookiecutter.project_slug}}/runtime.txt b/{{cookiecutter.project_slug}}/runtime.txt index 9fbd3bf0..6f651a3b 100644 --- a/{{cookiecutter.project_slug}}/runtime.txt +++ b/{{cookiecutter.project_slug}}/runtime.txt @@ -1 +1 @@ -python-3.6.8 +python-3.7.3 diff --git a/{{cookiecutter.project_slug}}/setup.cfg b/{{cookiecutter.project_slug}}/setup.cfg index c2139f1d..42b63861 100644 --- a/{{cookiecutter.project_slug}}/setup.cfg +++ b/{{cookiecutter.project_slug}}/setup.cfg @@ -7,7 +7,7 @@ max-line-length = 120 exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules [mypy] -python_version = 3.6 +python_version = 3.7 check_untyped_defs = True ignore_errors = False ignore_missing_imports = True From ea52a0be251e17b838f0b1f686ae8f578a70b6f6 Mon Sep 17 00:00:00 2001 From: Nicolas Stefani Date: Sun, 29 Sep 2019 21:46:34 -0300 Subject: [PATCH 014/146] Updated python version in warning message --- hooks/pre_gen_project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/pre_gen_project.py b/hooks/pre_gen_project.py index 91332f14..5cda07b6 100644 --- a/hooks/pre_gen_project.py +++ b/hooks/pre_gen_project.py @@ -35,7 +35,7 @@ if "{{ cookiecutter.use_docker }}".lower() == "n": if python_major_version == 2: print( WARNING + "You're running cookiecutter under Python 2, but the generated " - "project requires Python 3.6+. Do you want to proceed (y/n)? " + TERMINATOR + "project requires Python 3.7+. Do you want to proceed (y/n)? " + TERMINATOR ) yes_options, no_options = frozenset(["y"]), frozenset(["n"]) while True: From 02a092876f0b6e83ddeec43b3987afc1b16da549 Mon Sep 17 00:00:00 2001 From: Nicolas Stefani Date: Sun, 29 Sep 2019 21:47:33 -0300 Subject: [PATCH 015/146] Updated python version in classifiers --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 46c84b71..33032009 100644 --- a/setup.py +++ b/setup.py @@ -40,7 +40,7 @@ setup( "License :: OSI Approved :: BSD License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Software Development", ], From acb72cb84cbc4f208ae39882dcb329d3b88fc8ec Mon Sep 17 00:00:00 2001 From: Nicolas Stefani Date: Sun, 29 Sep 2019 21:48:04 -0300 Subject: [PATCH 016/146] Updated docs --- CONTRIBUTING.rst | 4 ++-- README.rst | 2 +- docs/deployment-on-pythonanywhere.rst | 2 +- docs/developing-locally.rst | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index cfe16740..cb59ae5f 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -39,9 +39,9 @@ To run all tests using various versions of python in virtualenvs defined in tox. It is possible to test with a specific version of python. To do this, the command is:: - $ tox -e py36 + $ tox -e py37 -This will run py.test with the python3.6 interpreter, for example. +This will run py.test with the python3.7 interpreter, for example. To run a particular test with tox for against your current Python version:: diff --git a/README.rst b/README.rst index 30a3a2db..e4f47351 100644 --- a/README.rst +++ b/README.rst @@ -37,7 +37,7 @@ Features --------- * For Django 2.2 -* Works with Python 3.6 +* Works with Python 3.7 * Renders Django projects with 100% starting test coverage * Twitter Bootstrap_ v4 (`maintained Foundation fork`_ also available) * 12-Factor_ based settings via django-environ_ diff --git a/docs/deployment-on-pythonanywhere.rst b/docs/deployment-on-pythonanywhere.rst index 83b23b27..4738d5a5 100644 --- a/docs/deployment-on-pythonanywhere.rst +++ b/docs/deployment-on-pythonanywhere.rst @@ -35,7 +35,7 @@ Make sure your project is fully committed and pushed up to Bitbucket or Github o git clone # you can also use hg cd my-project-name - mkvirtualenv --python=/usr/bin/python3.6 my-project-name + mkvirtualenv --python=/usr/bin/python3.7 my-project-name pip install -r requirements/production.txt # may take a few minutes diff --git a/docs/developing-locally.rst b/docs/developing-locally.rst index 8694dde7..fdab5a90 100644 --- a/docs/developing-locally.rst +++ b/docs/developing-locally.rst @@ -9,7 +9,7 @@ Setting Up Development Environment Make sure to have the following on your host: -* Python 3.6 +* Python 3.7 * PostgreSQL_. * Redis_, if using Celery @@ -17,7 +17,7 @@ First things first. #. Create a virtualenv: :: - $ python3.6 -m venv + $ python3.7 -m venv #. Activate the virtualenv you have just created: :: From 51bf90cdcaf64d1e981b721e8338434f6cec990f Mon Sep 17 00:00:00 2001 From: Nicolas Stefani Date: Sun, 29 Sep 2019 22:17:06 -0300 Subject: [PATCH 017/146] add name to contributors --- CONTRIBUTORS.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 4c3ad8a0..67372491 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -158,6 +158,7 @@ Listed in alphabetical order. Michael Gecht `@mimischi`_ @_mischi Min ho Kim `@minho42`_ mozillazg `@mozillazg`_ + Nico Stefani `@nicolas471`_ @moby_dick91 Oleg Russkin `@rolep`_ Pablo `@oubiga`_ Parbhat Puri `@parbhat`_ From d6b0bf8bb08769fb9cdf2e1d0a4b2a4a9a76de5c Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 30 Sep 2019 00:04:00 -0700 Subject: [PATCH 018/146] 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 019/146] 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 020/146] 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 021/146] 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 022/146] 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 023/146] 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 024/146] 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 025/146] 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 39e745dddf090aa1f06da1e5f6e12c669c3351a7 Mon Sep 17 00:00:00 2001 From: Caio Ariede Date: Wed, 2 Oct 2019 10:10:32 -0300 Subject: [PATCH 026/146] Fix #2250 -- No staticfile storage with GCP without Whitenoise --- {{cookiecutter.project_slug}}/config/settings/production.py | 1 + 1 file changed, 1 insertion(+) diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index e3741165..122871b1 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -107,6 +107,7 @@ STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage" STATICFILES_STORAGE = "config.settings.production.StaticRootS3Boto3Storage" STATIC_URL = f"https://{AWS_STORAGE_BUCKET_NAME}.s3.amazonaws.com/static/" {% elif cookiecutter.cloud_provider == 'GCP' -%} +STATICFILES_STORAGE = "storages.backends.gcloud.GoogleCloudStorage" STATIC_URL = f"https://storage.googleapis.com/{GS_BUCKET_NAME}/static/" {% endif -%} From f3b46ec4251358b7dd5ae24236b7cd9cc0a0b441 Mon Sep 17 00:00:00 2001 From: Caio Ariede Date: Wed, 2 Oct 2019 10:12:31 -0300 Subject: [PATCH 027/146] Add to CONTRIBUTORS --- CONTRIBUTORS.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 4c3ad8a0..4bf682ff 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -74,6 +74,7 @@ Listed in alphabetical order. Bouke Haarsma Brent Payne `@brentpayne`_ @brentpayne Burhan Khalid            `@burhan`_                   @burhan + Caio Ariede `@caioariede`_ @caioariede Carl Johnson `@carlmjohnson`_ @carlmjohnson Catherine Devlin `@catherinedevlin`_ Cédric Gaspoz `@cgaspoz`_ From d0c208d10fcd335b7b37a6a05d4d8ee72b995793 Mon Sep 17 00:00:00 2001 From: Caio Ariede Date: Wed, 2 Oct 2019 12:03:33 -0300 Subject: [PATCH 028/146] 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 029/146] 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 030/146] 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 031/146] 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 032/146] 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) From b8248f4758436d6ebb6ba79b7ad5c118de4d56de Mon Sep 17 00:00:00 2001 From: browniebroke Date: Fri, 4 Oct 2019 12:00:29 +0100 Subject: [PATCH 033/146] Update collectfast from 1.0.0 to 1.1.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 46c1a89e..fae99a3f 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -5,7 +5,7 @@ gunicorn==19.9.0 # https://github.com/benoitc/gunicorn psycopg2==2.8.3 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 {%- if cookiecutter.use_whitenoise == 'n' %} -Collectfast==1.0.0 # https://github.com/antonagestam/collectfast +Collectfast==1.1.0 # https://github.com/antonagestam/collectfast {%- endif %} {%- if cookiecutter.use_sentry == "y" %} sentry-sdk==0.12.3 # https://github.com/getsentry/sentry-python From ff8a9de24eb73e70dda87190d6e649ee39ecc180 Mon Sep 17 00:00:00 2001 From: Caio Ariede Date: Fri, 4 Oct 2019 09:32:25 -0300 Subject: [PATCH 034/146] Updates --- .../config/settings/production.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index 122871b1..7a5d5454 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -92,7 +92,6 @@ 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) {% elif cookiecutter.cloud_provider == 'GCP' %} -DEFAULT_FILE_STORAGE = "storages.backends.gcloud.GoogleCloudStorage" GS_BUCKET_NAME = env("DJANGO_GCP_STORAGE_BUCKET_NAME") GS_DEFAULT_ACL = "publicRead" {% endif -%} @@ -107,7 +106,7 @@ STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage" STATICFILES_STORAGE = "config.settings.production.StaticRootS3Boto3Storage" STATIC_URL = f"https://{AWS_STORAGE_BUCKET_NAME}.s3.amazonaws.com/static/" {% elif cookiecutter.cloud_provider == 'GCP' -%} -STATICFILES_STORAGE = "storages.backends.gcloud.GoogleCloudStorage" +STATICFILES_STORAGE = "config.settings.production.StaticRootGoogleCloudStorage" STATIC_URL = f"https://storage.googleapis.com/{GS_BUCKET_NAME}/static/" {% endif -%} @@ -133,8 +132,21 @@ class MediaRootS3Boto3Storage(S3Boto3Storage): DEFAULT_FILE_STORAGE = "config.settings.production.MediaRootS3Boto3Storage" MEDIA_URL = f"https://{AWS_STORAGE_BUCKET_NAME}.s3.amazonaws.com/media/" {%- elif cookiecutter.cloud_provider == 'GCP' %} +from storages.backends.gcloud import GoogleCloudStorage # noqa E402 + + +class StaticRootGoogleCloudStorage(GoogleCloudStorage): + location = "static" + default_acl = "publicRead" + + +class MediaRootGoogleCloudStorage(GoogleCloudStorage): + location = "media" + file_overwrite = False + + +DEFAULT_FILE_STORAGE = "config.settings.production.MediaRootGoogleCloudStorage" MEDIA_URL = f"https://storage.googleapis.com/{GS_BUCKET_NAME}/media/" -MEDIA_ROOT = f"https://storage.googleapis.com/{GS_BUCKET_NAME}/media/" {%- endif %} # TEMPLATES From 99ccd314d0b4f67f0847fe847838c4afacd7c2e9 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Fri, 4 Oct 2019 14:48:02 +0100 Subject: [PATCH 035/146] Add missing link --- CONTRIBUTORS.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 4bf682ff..3a6c7bd0 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -230,6 +230,7 @@ Listed in alphabetical order. .. _@c-rhodes: https://github.com/c-rhodes .. _@caffodian: https://github.com/caffodian .. _@canonnervio: https://github.com/canonnervio +.. _@caioariede: https://github.com/caioariede .. _@carlmjohnson: https://github.com/carlmjohnson .. _@catherinedevlin: https://github.com/catherinedevlin .. _@ccurvey: https://github.com/ccurvey From 5750330ac2674fe6e9ad361b28cb46e1dc5b8772 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sun, 6 Oct 2019 10:28:15 +0100 Subject: [PATCH 036/146] Merge whitenoise & cloud provider parametrize in tests --- tests/test_cookiecutter_generation.py | 34 ++++++++++++++------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py index 20e4f9ed..f931bce0 100755 --- a/tests/test_cookiecutter_generation.py +++ b/tests/test_cookiecutter_generation.py @@ -11,9 +11,6 @@ from binaryornot.check import is_binary PATTERN = r"{{(\s?cookiecutter)[.](.*?)}}" RE_OBJ = re.compile(PATTERN) -YN_CHOICES = ["y", "n"] -CLOUD_CHOICES = ["AWS", "GCE", "None"] - @pytest.fixture def context(): @@ -30,14 +27,24 @@ def context(): @pytest_fixture_plus -@pytest.mark.parametrize("windows", YN_CHOICES, ids=lambda yn: f"win:{yn}") -@pytest.mark.parametrize("use_docker", YN_CHOICES, ids=lambda yn: f"docker:{yn}") -@pytest.mark.parametrize("use_celery", YN_CHOICES, ids=lambda yn: f"celery:{yn}") -@pytest.mark.parametrize("use_mailhog", YN_CHOICES, ids=lambda yn: f"mailhog:{yn}") -@pytest.mark.parametrize("use_sentry", YN_CHOICES, ids=lambda yn: f"sentry:{yn}") -@pytest.mark.parametrize("use_compressor", YN_CHOICES, ids=lambda yn: f"cmpr:{yn}") -@pytest.mark.parametrize("use_whitenoise", YN_CHOICES, ids=lambda yn: f"wnoise:{yn}") -@pytest.mark.parametrize("cloud_provider", CLOUD_CHOICES, ids=lambda yn: f"cloud:{yn}") +@pytest.mark.parametrize("windows", ["y", "n"], ids=lambda yn: f"win:{yn}") +@pytest.mark.parametrize("use_docker", ["y", "n"], ids=lambda yn: f"docker:{yn}") +@pytest.mark.parametrize("use_celery", ["y", "n"], ids=lambda yn: f"celery:{yn}") +@pytest.mark.parametrize("use_mailhog", ["y", "n"], ids=lambda yn: f"mailhog:{yn}") +@pytest.mark.parametrize("use_sentry", ["y", "n"], ids=lambda yn: f"sentry:{yn}") +@pytest.mark.parametrize("use_compressor", ["y", "n"], ids=lambda yn: f"cmpr:{yn}") +@pytest.mark.parametrize( + "use_whitenoise,cloud_provider", + [ + ("y", "AWS"), + ("y", "GCP"), + ("y", "None"), + ("n", "AWS"), + ("n", "GCP"), + # no whitenoise + co cloud provider is not supported + ], + ids=lambda id: f"wnoise:{id[0]}-cloud:{id[1]}", +) def context_combination( windows, use_docker, @@ -49,11 +56,6 @@ 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, From 703e8509aa863478e6ba1ee6f20e29aada693d15 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sun, 6 Oct 2019 11:09:13 +0100 Subject: [PATCH 037/146] Fix broken link in list of contributors --- CONTRIBUTORS.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index d14afcc9..3a3930b2 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -304,6 +304,7 @@ Listed in alphabetical order. .. _@mrcoles: https://github.com/mrcoles .. _@msaizar: https://github.com/msaizar .. _@myilmaz: https://github.com/myilmaz +.. _@nicolas471: https://github.com/nicolas471 .. _@noisy: https://github.com/noisy .. _@originell: https://github.com/originell .. _@oubiga: https://github.com/oubiga From 058d3a2add08cb337042b3a403251622e4e9baff Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sun, 6 Oct 2019 11:15:28 +0100 Subject: [PATCH 038/146] Update changelog with recent changes --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5df2d3a3..2e7d9220 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,18 @@ All enhancements and patches to Cookiecutter Django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [2019-10-06] +### Changed +- Default Python version is now 3.7 (@nicolas471) + +## [2019-10-04] +### Fixed +- Fix static files handling on GCP (@caioariede) + +## [2019-10-03] +### Fixed +- Fix incompatible combination between Whitenoise and no cloud provider (@caioariede) + ## [2019-07-09] ### Fixed - Always use test settings in pytest (@danihodovic) From 98a443626b7b359b629e5e51502d0bb7ed8519d8 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sun, 6 Oct 2019 13:07:20 +0100 Subject: [PATCH 039/146] Update to latest Python 3.7 runtime on Heroku --- {{cookiecutter.project_slug}}/runtime.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/runtime.txt b/{{cookiecutter.project_slug}}/runtime.txt index 6f651a3b..42731f2f 100644 --- a/{{cookiecutter.project_slug}}/runtime.txt +++ b/{{cookiecutter.project_slug}}/runtime.txt @@ -1 +1 @@ -python-3.7.3 +python-3.7.4 From 973fbfe7a463acf14fb16c39ff5037240a20903d Mon Sep 17 00:00:00 2001 From: browniebroke Date: Mon, 7 Oct 2019 12:00:30 +0100 Subject: [PATCH 040/146] Update pytest from 5.2.0 to 5.2.1 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index e9d2afb2..efc3d117 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,7 @@ flake8==3.7.8 # Testing # ------------------------------------------------------------------------------ tox==3.14.0 -pytest==5.2.0 +pytest==5.2.1 pytest_cases==1.11.3 pytest-cookies==0.4.0 pytest-xdist==1.30.0 From 86fd35bba6d8b04679f6dba01cae5e32771ea28c Mon Sep 17 00:00:00 2001 From: browniebroke Date: Mon, 7 Oct 2019 12:00:31 +0100 Subject: [PATCH 041/146] Update pytest from 5.2.0 to 5.2.1 --- {{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 41813c47..daa4870c 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.2.0 # https://github.com/pytest-dev/pytest +pytest==5.2.1 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.2 # https://github.com/Frozenball/pytest-sugar # Code quality From b338a7490a042ca36d07612a3b1dfdd7eedf1910 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Mon, 7 Oct 2019 12:00:34 +0100 Subject: [PATCH 042/146] Update collectfast from 1.1.0 to 1.2.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 fae99a3f..e59644ff 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -5,7 +5,7 @@ gunicorn==19.9.0 # https://github.com/benoitc/gunicorn psycopg2==2.8.3 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 {%- if cookiecutter.use_whitenoise == 'n' %} -Collectfast==1.1.0 # https://github.com/antonagestam/collectfast +Collectfast==1.2.0 # https://github.com/antonagestam/collectfast {%- endif %} {%- if cookiecutter.use_sentry == "y" %} sentry-sdk==0.12.3 # https://github.com/getsentry/sentry-python From ca9addbbefa91654077acfd332150a503bd8e175 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Mon, 7 Oct 2019 12:00:36 +0100 Subject: [PATCH 043/146] Update pytz from 2019.2 to 2019.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 d0bce155..01791e8c 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -1,4 +1,4 @@ -pytz==2019.2 # https://github.com/stub42/pytz +pytz==2019.3 # https://github.com/stub42/pytz python-slugify==3.0.4 # https://github.com/un33k/python-slugify Pillow==6.2.0 # https://github.com/python-pillow/Pillow {%- if cookiecutter.use_compressor == "y" %} From 5e196b45e9f6c1b45b30e942df38526b53587f36 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Thu, 10 Oct 2019 11:36:48 +0100 Subject: [PATCH 044/146] Pin Traefik Docker image to v1 Until we do the required changes to update to v2. Fixes #2258 --- .../compose/production/traefik/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile index 7088e6fe..d7363a1a 100644 --- a/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile @@ -1,4 +1,4 @@ -FROM traefik:alpine +FROM traefik:1.7-alpine RUN mkdir -p /etc/traefik/acme RUN touch /etc/traefik/acme/acme.json RUN chmod 600 /etc/traefik/acme/acme.json From 93473cb39adff9c6317ee93b5d7d6becb9a553ce Mon Sep 17 00:00:00 2001 From: browniebroke Date: Fri, 11 Oct 2019 12:00:29 +0100 Subject: [PATCH 045/146] Update python-slugify from 3.0.4 to 3.0.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 01791e8c..f7b0b4d3 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -1,5 +1,5 @@ pytz==2019.3 # https://github.com/stub42/pytz -python-slugify==3.0.4 # https://github.com/un33k/python-slugify +python-slugify==3.0.6 # https://github.com/un33k/python-slugify 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 From f26cad1faa9761aded5b214b1688297208b764dc Mon Sep 17 00:00:00 2001 From: browniebroke Date: Fri, 11 Oct 2019 12:00:32 +0100 Subject: [PATCH 046/146] Update redis from 3.3.8 to 3.3.10 --- {{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 01791e8c..3f96a898 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -8,7 +8,7 @@ argon2-cffi==19.1.0 # https://github.com/hynek/argon2_cffi {%- if cookiecutter.use_whitenoise == 'y' %} whitenoise==4.1.4 # https://github.com/evansd/whitenoise {%- endif %} -redis==3.3.8 # https://github.com/antirez/redis +redis==3.3.10 # https://github.com/antirez/redis {%- if cookiecutter.use_celery == "y" %} celery==4.3.0 # pyup: < 5.0 # https://github.com/celery/celery django-celery-beat==1.5.0 # https://github.com/celery/django-celery-beat From be8afa27b3a7f02e6ddadaa676915572a5a20b63 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Mon, 14 Oct 2019 12:00:29 +0100 Subject: [PATCH 047/146] Update redis from 3.3.10 to 3.3.11 --- {{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 1270a25e..049d75f1 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -8,7 +8,7 @@ argon2-cffi==19.1.0 # https://github.com/hynek/argon2_cffi {%- if cookiecutter.use_whitenoise == 'y' %} whitenoise==4.1.4 # https://github.com/evansd/whitenoise {%- endif %} -redis==3.3.10 # https://github.com/antirez/redis +redis==3.3.11 # https://github.com/antirez/redis {%- if cookiecutter.use_celery == "y" %} celery==4.3.0 # pyup: < 5.0 # https://github.com/celery/celery django-celery-beat==1.5.0 # https://github.com/celery/django-celery-beat From f8cbea93aa070195bd1beb674755e1f999d1c3e6 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Thu, 17 Oct 2019 12:00:29 +0100 Subject: [PATCH 048/146] Update mypy from 0.730 to 0.740 --- {{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 daa4870c..6f4289c3 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.730 # https://github.com/python/mypy +mypy==0.740 # https://github.com/python/mypy pytest==5.2.1 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.2 # https://github.com/Frozenball/pytest-sugar From f87757f4abec4dd0e427df72ee3c47bf33a08154 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Thu, 17 Oct 2019 12:00:31 +0100 Subject: [PATCH 049/146] Update pytest-django from 3.5.1 to 3.6.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 daa4870c..a0c7b525 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -32,4 +32,4 @@ 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.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 +pytest-django==3.6.0 # https://github.com/pytest-dev/pytest-django From c8ebb633cfc2c4b1b8e08aedcf0b7e7fe5876e8d Mon Sep 17 00:00:00 2001 From: browniebroke Date: Fri, 18 Oct 2019 12:00:29 +0100 Subject: [PATCH 050/146] Update sentry-sdk from 0.12.3 to 0.13.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 e59644ff..10d1ea5b 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.2.0 # https://github.com/antonagestam/collectfast {%- endif %} {%- if cookiecutter.use_sentry == "y" %} -sentry-sdk==0.12.3 # https://github.com/getsentry/sentry-python +sentry-sdk==0.13.0 # https://github.com/getsentry/sentry-python {%- endif %} # Django From 42e5581198dd3f40448d89d486bcf6c6372ae955 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Fri, 18 Oct 2019 12:00:32 +0100 Subject: [PATCH 051/146] Update django-crispy-forms from 1.7.2 to 1.8.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 049d75f1..9bf87407 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -23,7 +23,7 @@ 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 -django-crispy-forms==1.7.2 # https://github.com/django-crispy-forms/django-crispy-forms +django-crispy-forms==1.8.0 # 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 {%- endif %} From 96ade99c66c396ec2cac70f93cb173ef8ec2208c Mon Sep 17 00:00:00 2001 From: browniebroke Date: Sun, 20 Oct 2019 12:00:29 +0100 Subject: [PATCH 052/146] Update psycopg2-binary from 2.8.3 to 2.8.4 --- {{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 dd795609..c7e9aa92 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -6,7 +6,7 @@ Sphinx==2.2.0 # https://github.com/sphinx-doc/sphinx {%- if cookiecutter.use_docker == 'y' %} psycopg2==2.8.3 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 {%- else %} -psycopg2-binary==2.8.3 # https://github.com/psycopg/psycopg2 +psycopg2-binary==2.8.4 # https://github.com/psycopg/psycopg2 {%- endif %} # Testing From 58f41fc97f9fc1ebf6853c7855a9450d9c92e8f1 Mon Sep 17 00:00:00 2001 From: Jelmert Date: Mon, 21 Oct 2019 09:59:37 +0200 Subject: [PATCH 053/146] fix: remove the aws Dockerfile and remove the awscli definition from production.yml when not selected --- hooks/post_gen_project.py | 7 +++++++ {{cookiecutter.project_slug}}/production.yml | 3 +++ 2 files changed, 10 insertions(+) diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index ff84f180..95815564 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -279,6 +279,10 @@ def remove_node_dockerfile(): shutil.rmtree(os.path.join("compose", "local", "node")) +def remove_aws_dockerfile(): + shutil.rmtree(os.path.join("compose", "production", "aws")) + + def main(): debug = "{{ cookiecutter.debug }}".lower() == "y" @@ -302,6 +306,9 @@ def main(): else: remove_docker_files() + if "{{ cookiecutter.use_docker }}".lower() == "y" and "{{ cookiecutter.cloud_provider}}".lower() != 'aws': + remove_aws_dockerfile() + if "{{ cookiecutter.use_heroku }}".lower() == "n": remove_heroku_files() diff --git a/{{cookiecutter.project_slug}}/production.yml b/{{cookiecutter.project_slug}}/production.yml index 331cbba6..62ec9d82 100644 --- a/{{cookiecutter.project_slug}}/production.yml +++ b/{{cookiecutter.project_slug}}/production.yml @@ -65,6 +65,8 @@ services: command: /start-flower {%- endif %} + + {% if cookiecutter.cloud_provider == 'AWS' %} awscli: build: context: . @@ -73,3 +75,4 @@ services: - ./.envs/.production/.django volumes: - production_postgres_data_backups:/backups + {%- endif %} From eb8ea447e488df634373e44de36e4aad7fd2dfb3 Mon Sep 17 00:00:00 2001 From: Jelmert Date: Mon, 21 Oct 2019 11:12:53 +0200 Subject: [PATCH 054/146] fix: black --- hooks/post_gen_project.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index 95815564..0544f14b 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -306,7 +306,10 @@ def main(): else: remove_docker_files() - if "{{ cookiecutter.use_docker }}".lower() == "y" and "{{ cookiecutter.cloud_provider}}".lower() != 'aws': + if ( + "{{ cookiecutter.use_docker }}".lower() == "y" + and "{{ cookiecutter.cloud_provider}}".lower() != "aws" + ): remove_aws_dockerfile() if "{{ cookiecutter.use_heroku }}".lower() == "n": From 39c33c550c5e26e2edece8b759ba4fc77cba5b7d Mon Sep 17 00:00:00 2001 From: browniebroke Date: Mon, 21 Oct 2019 12:00:29 +0100 Subject: [PATCH 055/146] Update python-slugify from 3.0.6 to 4.0.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 9bf87407..91b1e79c 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -1,5 +1,5 @@ pytz==2019.3 # https://github.com/stub42/pytz -python-slugify==3.0.6 # https://github.com/un33k/python-slugify +python-slugify==4.0.0 # https://github.com/un33k/python-slugify 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 From 8cce6df70aae9ce59ca746dd2419a9d284e254cf Mon Sep 17 00:00:00 2001 From: browniebroke Date: Mon, 21 Oct 2019 12:00:32 +0100 Subject: [PATCH 056/146] Update django-extensions from 2.2.3 to 2.2.5 --- {{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 dd795609..1068b194 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.3 # https://github.com/django-extensions/django-extensions +django-extensions==2.2.5 # https://github.com/django-extensions/django-extensions django-coverage-plugin==1.6.0 # https://github.com/nedbat/django_coverage_plugin pytest-django==3.6.0 # https://github.com/pytest-dev/pytest-django From 400fcc4030fec8cff85cca30082a70977fb14716 Mon Sep 17 00:00:00 2001 From: Yuchen Xie Date: Tue, 22 Oct 2019 10:20:00 +0800 Subject: [PATCH 057/146] Prevent collectfast from guessing a wrong strategy If `COLLECTFAST_STRATEGY` is not provided in `settings`, `collectfast` has to guess a "strategy". For the case with AWS, it guesses `BotoStrategy` in stead of `S3Boto3Storage`, which is a wrong decision as we `pip install django-storages[boto3]` (`boto3` in favor of `boto`). Setting `COLLECTFAST_STRATEGY` is also encouraged as `collectfast` is not going to guess the strategy in the future. Ref: * https://github.com/antonagestam/collectfast/blob/f37dd1faa2046a2ebb88c098eb03e56a95534ec6/collectfast/management/commands/collectstatic.py#L33 * https://github.com/antonagestam/collectfast/blob/f37dd1faa2046a2ebb88c098eb03e56a95534ec6/collectfast/strategies/base.py#L170 --- CONTRIBUTORS.rst | 2 ++ {{cookiecutter.project_slug}}/config/settings/production.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 3a3930b2..90bb6395 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -200,6 +200,7 @@ Listed in alphabetical order. William Archinal `@archinal`_ Xaver Y.R. Chen `@yrchen`_ @yrchen Yaroslav Halchenko + Yuchen Xie `@mapx`_ ========================== ============================ ============== .. _@a7p: https://github.com/a7p @@ -291,6 +292,7 @@ Listed in alphabetical order. .. _@knitatoms: https://github.com/knitatoms .. _@krzysztofzuraw: https://github.com/krzysztofzuraw .. _@MathijsHoogland: https://github.com/MathijsHoogland +.. _@mapx: https://github.com/mapx .. _@mattayes: https://github.com/mattayes .. _@menzenski: https://github.com/menzenski .. _@mfwarren: https://github.com/mfwarren diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index 7a5d5454..712f2bf4 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -104,9 +104,11 @@ GS_DEFAULT_ACL = "publicRead" STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage" {% elif cookiecutter.cloud_provider == 'AWS' -%} STATICFILES_STORAGE = "config.settings.production.StaticRootS3Boto3Storage" +COLLECTFAST_STRATEGY = "collectfast.strategies.boto3.Boto3Strategy" STATIC_URL = f"https://{AWS_STORAGE_BUCKET_NAME}.s3.amazonaws.com/static/" {% elif cookiecutter.cloud_provider == 'GCP' -%} STATICFILES_STORAGE = "config.settings.production.StaticRootGoogleCloudStorage" +COLLECTFAST_STRATEGY = "collectfast.strategies.gcloud.GoogleCloudStrategy" STATIC_URL = f"https://storage.googleapis.com/{GS_BUCKET_NAME}/static/" {% endif -%} From 998733411c7340a451c4099bd93f4d23c24b8eaf Mon Sep 17 00:00:00 2001 From: browniebroke Date: Tue, 22 Oct 2019 12:00:35 +0100 Subject: [PATCH 058/146] Update pillow from 6.2.0 to 6.2.1 --- {{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 9bf87407..efff1c48 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -1,6 +1,6 @@ pytz==2019.3 # https://github.com/stub42/pytz python-slugify==3.0.6 # https://github.com/un33k/python-slugify -Pillow==6.2.0 # https://github.com/python-pillow/Pillow +Pillow==6.2.1 # 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 3f0134a64b2dd148af1e59de4ce75780096f5d2b Mon Sep 17 00:00:00 2001 From: browniebroke Date: Wed, 23 Oct 2019 12:00:31 +0100 Subject: [PATCH 059/146] Update collectfast from 1.2.0 to 1.3.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 10d1ea5b..a036e77e 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -5,7 +5,7 @@ gunicorn==19.9.0 # https://github.com/benoitc/gunicorn psycopg2==2.8.3 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 {%- if cookiecutter.use_whitenoise == 'n' %} -Collectfast==1.2.0 # https://github.com/antonagestam/collectfast +Collectfast==1.3.0 # https://github.com/antonagestam/collectfast {%- endif %} {%- if cookiecutter.use_sentry == "y" %} sentry-sdk==0.13.0 # https://github.com/getsentry/sentry-python From 662ca222054e0acbbfac6aae1fae1dc7e6f5a264 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Thu, 24 Oct 2019 12:00:29 +0100 Subject: [PATCH 060/146] Update pytest_cases from 1.11.3 to 1.11.4 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index efc3d117..c90fb4cd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,7 +11,7 @@ flake8==3.7.8 # ------------------------------------------------------------------------------ tox==3.14.0 pytest==5.2.1 -pytest_cases==1.11.3 +pytest_cases==1.11.4 pytest-cookies==0.4.0 pytest-xdist==1.30.0 pyyaml==5.1.2 From bd61b797325d3545801940ca5a3013d05ede52d4 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Fri, 25 Oct 2019 12:00:36 +0100 Subject: [PATCH 061/146] Update pytest from 5.2.1 to 5.2.2 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index efc3d117..0614fa8f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,7 @@ flake8==3.7.8 # Testing # ------------------------------------------------------------------------------ tox==3.14.0 -pytest==5.2.1 +pytest==5.2.2 pytest_cases==1.11.3 pytest-cookies==0.4.0 pytest-xdist==1.30.0 From c2aa615fdc1c94d8d1a1ef8f33b5859ef7c6d6e4 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Fri, 25 Oct 2019 12:00:37 +0100 Subject: [PATCH 062/146] Update pytest from 5.2.1 to 5.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 1d08dcb7..5dfff7ea 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -12,7 +12,7 @@ psycopg2-binary==2.8.4 # https://github.com/psycopg/psycopg2 # Testing # ------------------------------------------------------------------------------ mypy==0.740 # https://github.com/python/mypy -pytest==5.2.1 # https://github.com/pytest-dev/pytest +pytest==5.2.2 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.2 # https://github.com/Frozenball/pytest-sugar # Code quality From b7976b9c3623adbac35904928522174035daaf12 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Fri, 25 Oct 2019 12:00:40 +0100 Subject: [PATCH 063/146] Update sentry-sdk from 0.13.0 to 0.13.1 --- {{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 a036e77e..00c1a16c 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.3.0 # https://github.com/antonagestam/collectfast {%- endif %} {%- if cookiecutter.use_sentry == "y" %} -sentry-sdk==0.13.0 # https://github.com/getsentry/sentry-python +sentry-sdk==0.13.1 # https://github.com/getsentry/sentry-python {%- endif %} # Django From caa8b5a303a20065741193710455b5568f543029 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Sat, 26 Oct 2019 12:00:30 +0100 Subject: [PATCH 064/146] Update sphinx from 2.2.0 to 2.2.1 --- {{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 5dfff7ea..bb60bed0 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -2,7 +2,7 @@ Werkzeug==0.14.1 # pyup: < 0.15 # https://github.com/pallets/werkzeug ipdb==0.12.2 # https://github.com/gotcha/ipdb -Sphinx==2.2.0 # https://github.com/sphinx-doc/sphinx +Sphinx==2.2.1 # https://github.com/sphinx-doc/sphinx {%- if cookiecutter.use_docker == 'y' %} psycopg2==2.8.3 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 {%- else %} From d006bc610c3d431d9544c4d5b27aa812cc2b93c5 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Mon, 28 Oct 2019 11:00:30 +0000 Subject: [PATCH 065/146] Update collectfast from 1.3.0 to 1.3.1 --- {{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 00c1a16c..d65a0cbc 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -5,7 +5,7 @@ gunicorn==19.9.0 # https://github.com/benoitc/gunicorn psycopg2==2.8.3 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 {%- if cookiecutter.use_whitenoise == 'n' %} -Collectfast==1.3.0 # https://github.com/antonagestam/collectfast +Collectfast==1.3.1 # https://github.com/antonagestam/collectfast {%- endif %} {%- if cookiecutter.use_sentry == "y" %} sentry-sdk==0.13.1 # https://github.com/getsentry/sentry-python From 9b61317682d402c1c232b3f9c486ffebd5a99339 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Mon, 28 Oct 2019 11:00:33 +0000 Subject: [PATCH 066/146] Update argon2-cffi from 19.1.0 to 19.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 efff1c48..33ac3f7b 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -4,7 +4,7 @@ Pillow==6.2.1 # 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 %} -argon2-cffi==19.1.0 # https://github.com/hynek/argon2_cffi +argon2-cffi==19.2.0 # https://github.com/hynek/argon2_cffi {%- if cookiecutter.use_whitenoise == 'y' %} whitenoise==4.1.4 # https://github.com/evansd/whitenoise {%- endif %} From bb6188d43111536cbd6767a54c4f12d5a9647be8 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 28 Oct 2019 21:10:07 -0500 Subject: [PATCH 067/146] Update black from 19.3b0 to 19.10b0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 39080994..13398eb3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ binaryornot==0.4.4 # Code quality # ------------------------------------------------------------------------------ -black==19.3b0 +black==19.10b0 flake8==3.7.8 # Testing From 10e395f65c1bc8133e99720afe3b1bcfe01edbd5 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Tue, 29 Oct 2019 11:00:32 +0000 Subject: [PATCH 068/146] Update black from 19.3b0 to 19.10b0 --- {{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 bb60bed0..5756ebe4 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -19,7 +19,7 @@ pytest-sugar==0.9.2 # https://github.com/Frozenball/pytest-sugar # ------------------------------------------------------------------------------ flake8==3.7.8 # https://github.com/PyCQA/flake8 coverage==4.5.4 # https://github.com/nedbat/coveragepy -black==19.3b0 # https://github.com/ambv/black +black==19.10b0 # https://github.com/ambv/black pylint-django==2.0.11 # https://github.com/PyCQA/pylint-django {%- if cookiecutter.use_celery == 'y' %} pylint-celery==0.3 # https://github.com/PyCQA/pylint-celery From 4a194c6966dcc5157610a175b2fe30646121491b Mon Sep 17 00:00:00 2001 From: leollon Date: Tue, 29 Oct 2019 22:47:27 +0800 Subject: [PATCH 069/146] Add pre-commit for the generated project. (#2171) --- CONTRIBUTORS.rst | 2 ++ README.rst | 2 ++ docs/developing-locally.rst | 6 ++++++ .../.pre-commit-config.yaml | 19 +++++++++++++++++++ .../requirements/local.txt | 1 + 5 files changed, 30 insertions(+) create mode 100644 {{cookiecutter.project_slug}}/.pre-commit-config.yaml diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 90bb6395..5224de1f 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -137,6 +137,7 @@ Listed in alphabetical order. Keyvan Mosharraf `@keyvanm`_ Krzysztof Szumny `@noisy`_ Krzysztof Żuraw `@krzysztofzuraw`_ + Leo won `@leollon`_ Leo Zhou `@glasslion`_ Leonardo Jimenez `@xpostudio4`_ Lin Xianyi `@iynaix`_ @@ -291,6 +292,7 @@ Listed in alphabetical order. .. _@keyvanm: https://github.com/keyvanm .. _@knitatoms: https://github.com/knitatoms .. _@krzysztofzuraw: https://github.com/krzysztofzuraw +.. _@leollon: https://github.com/leollon .. _@MathijsHoogland: https://github.com/MathijsHoogland .. _@mapx: https://github.com/mapx .. _@mattayes: https://github.com/mattayes diff --git a/README.rst b/README.rst index e4f47351..4be3c4bc 100644 --- a/README.rst +++ b/README.rst @@ -53,6 +53,7 @@ Features * Instructions for deploying to PythonAnywhere_ * Run tests with unittest or pytest * Customizable PostgreSQL version +* Default integration with pre-commit_ for identifying simple issues before submission to code review .. _`maintained Foundation fork`: https://github.com/Parbhat/cookiecutter-django-foundation @@ -84,6 +85,7 @@ Optional Integrations .. _PythonAnywhere: https://www.pythonanywhere.com/ .. _Traefik: https://traefik.io/ .. _LetsEncrypt: https://letsencrypt.org/ +.. _pre-commit: https://github.com/pre-commit/pre-commit Constraints ----------- diff --git a/docs/developing-locally.rst b/docs/developing-locally.rst index fdab5a90..7a58d099 100644 --- a/docs/developing-locally.rst +++ b/docs/developing-locally.rst @@ -26,6 +26,12 @@ First things first. #. Install development requirements: :: $ pip install -r requirements/local.txt + $ pre-commit install + + .. note:: + + the `pre-commit` exists in the generated project as default. + for the details of `pre-commit`, follow the [site of pre-commit](https://pre-commit.com/). #. Create a new PostgreSQL database using createdb_: :: diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml new file mode 100644 index 00000000..b9d69a9a --- /dev/null +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -0,0 +1,19 @@ +exclude: 'docs|node_modules|migrations|.git|.tox' +default_stages: [commit] +fail_fast: true + +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: master + hooks: + - id: trailing-whitespace + files: (^|/)a/.+\.(py|html|sh|css|js)$ + +- repo: local + hooks: + - id: flake8 + name: flake8 + entry: flake8 + language: python + types: [python] + diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index bb60bed0..73104eda 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -24,6 +24,7 @@ pylint-django==2.0.11 # https://github.com/PyCQA/pylint-django {%- if cookiecutter.use_celery == 'y' %} pylint-celery==0.3 # https://github.com/PyCQA/pylint-celery {%- endif %} +pre-commit==1.20.0 # https://github.com/pre-commit/pre-commit # Django # ------------------------------------------------------------------------------ From 04f3ae75dc731d72336e648bb4a653f62d7d5757 Mon Sep 17 00:00:00 2001 From: Bruce Olivier Date: Sat, 2 Nov 2019 15:57:05 -0500 Subject: [PATCH 070/146] Added more settings to .editorconfig to run isort and have black compatibility. --- CONTRIBUTORS.rst | 2 ++ {{cookiecutter.project_slug}}/.editorconfig | 14 ++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 90bb6395..8a1d9c45 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -73,6 +73,7 @@ Listed in alphabetical order. Bo Lopker `@blopker`_ Bouke Haarsma Brent Payne `@brentpayne`_ @brentpayne + Bruce Olivier `@bolivierjr`_ Burhan Khalid            `@burhan`_                   @burhan Caio Ariede `@caioariede`_ @caioariede Carl Johnson `@carlmjohnson`_ @carlmjohnson @@ -225,6 +226,7 @@ Listed in alphabetical order. .. _@bloodpet: https://github.com/bloodpet .. _@blopker: https://github.com/blopker .. _@bogdal: https://github.com/bogdal +.. _@bolivierjr: https://github.com/bolivierjr .. _@brentpayne: https://github.com/brentpayne .. _@btknu: https://github.com/btknu .. _@burhan: https://github.com/burhan diff --git a/{{cookiecutter.project_slug}}/.editorconfig b/{{cookiecutter.project_slug}}/.editorconfig index b19266bf..792dd3b0 100644 --- a/{{cookiecutter.project_slug}}/.editorconfig +++ b/{{cookiecutter.project_slug}}/.editorconfig @@ -13,10 +13,16 @@ indent_style = space indent_size = 4 [*.py] -line_length=120 -known_first_party={{ cookiecutter.project_slug }} -multi_line_output=3 -default_section=THIRDPARTY +line_length = 120 +known_first_party = {{ cookiecutter.project_slug }} +multi_line_output = 3 +default_section = THIRDPARTY +recursive = true +skip = venv/ +skip_glob = **/migrations/*.py +include_trailing_comma = true +force_grid_wrap = 0 +use_parentheses = true [*.{html,css,scss,json,yml}] indent_style = space From 91c6f69a57d4528e749c79f03a0cf2623eca23ab Mon Sep 17 00:00:00 2001 From: Gilbishkosma Date: Sun, 3 Nov 2019 19:51:56 +0530 Subject: [PATCH 071/146] Update deployment-with-docker.rst --- docs/deployment-with-docker.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/deployment-with-docker.rst b/docs/deployment-with-docker.rst index 038778cf..0df50ff4 100644 --- a/docs/deployment-with-docker.rst +++ b/docs/deployment-with-docker.rst @@ -152,6 +152,7 @@ If you are using ``supervisor``, you can use this file as a starting point:: Move it to ``/etc/supervisor/conf.d/{{cookiecutter.project_slug}}.conf`` and run:: supervisorctl reread + supervisorctl update supervisorctl start {{cookiecutter.project_slug}} For status check, run:: From 8f74fdb9423d34c6674b2737d0ddb879eafddffb Mon Sep 17 00:00:00 2001 From: browniebroke Date: Mon, 4 Nov 2019 12:00:33 +0100 Subject: [PATCH 072/146] Update django from 2.2.6 to 2.2.7 --- {{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 b7596f81..dbdee176 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.6 # pyup: < 3.0 # https://www.djangoproject.com/ +django==2.2.7 # 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 cbbbf351d033184c8b6557f5f79c7bcc050b00ca Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Mon, 4 Nov 2019 12:34:43 +0000 Subject: [PATCH 073/146] Update CONTRIBUTORS.rst --- CONTRIBUTORS.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 8a1d9c45..ae4022d5 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -113,6 +113,7 @@ Listed in alphabetical order. Florian Idelberger `@step21`_ @windrush Garry Cairns `@garry-cairns`_ Garry Polley `@garrypolley`_ + Gilbishkosma `@Gilbishkosma`_ Hamish Durkin `@durkode`_ Hana Quadara `@hanaquadara`_ Harry Percival `@hjwp`_ @@ -269,6 +270,7 @@ Listed in alphabetical order. .. _@foarsitter: https://github.com/foarsitter .. _@garry-cairns: https://github.com/garry-cairns .. _@garrypolley: https://github.com/garrypolley +.. _@Gilbishkosma: https://github.com/Gilbishkosma .. _@glasslion: https://github.com/glasslion .. _@goldhand: https://github.com/goldhand .. _@hackebrot: https://github.com/hackebrot From 9e58bb4e80762cd250feb9b783c990cc482d2375 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Tue, 5 Nov 2019 12:00:32 +0100 Subject: [PATCH 074/146] Update pylint-django from 2.0.11 to 2.0.12 --- {{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 e011da63..baee3196 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -20,7 +20,7 @@ pytest-sugar==0.9.2 # https://github.com/Frozenball/pytest-sugar flake8==3.7.8 # https://github.com/PyCQA/flake8 coverage==4.5.4 # https://github.com/nedbat/coveragepy black==19.10b0 # https://github.com/ambv/black -pylint-django==2.0.11 # https://github.com/PyCQA/pylint-django +pylint-django==2.0.12 # https://github.com/PyCQA/pylint-django {%- if cookiecutter.use_celery == 'y' %} pylint-celery==0.3 # https://github.com/PyCQA/pylint-celery {%- endif %} From 66c4f630a7d122b8db01bec9f50dae0db6a21df5 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Wed, 6 Nov 2019 12:00:34 +0100 Subject: [PATCH 075/146] Update pytest_cases from 1.11.4 to 1.11.5 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 13398eb3..66786b19 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,7 +11,7 @@ flake8==3.7.8 # ------------------------------------------------------------------------------ tox==3.14.0 pytest==5.2.2 -pytest_cases==1.11.4 +pytest_cases==1.11.5 pytest-cookies==0.4.0 pytest-xdist==1.30.0 pyyaml==5.1.2 From 0374f11d099930fa3efd2be278f4d4ffa9dcede7 Mon Sep 17 00:00:00 2001 From: Yuchen Xie <4576282+mapx@users.noreply.github.com> Date: Thu, 7 Nov 2019 18:59:23 +0800 Subject: [PATCH 076/146] Using WhiteNoise in development --- {{cookiecutter.project_slug}}/config/settings/base.py | 3 +++ {{cookiecutter.project_slug}}/config/settings/local.py | 8 ++++++++ .../config/settings/production.py | 9 +-------- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/base.py b/{{cookiecutter.project_slug}}/config/settings/base.py index 41f0f46c..935a0d12 100644 --- a/{{cookiecutter.project_slug}}/config/settings/base.py +++ b/{{cookiecutter.project_slug}}/config/settings/base.py @@ -131,6 +131,9 @@ AUTH_PASSWORD_VALIDATORS = [ # https://docs.djangoproject.com/en/dev/ref/settings/#middleware MIDDLEWARE = [ "django.middleware.security.SecurityMiddleware", +{%- if cookiecutter.use_whitenoise == 'y' %} + "whitenoise.middleware.WhiteNoiseMiddleware", +{%- endif %} "django.contrib.sessions.middleware.SessionMiddleware", "django.middleware.locale.LocaleMiddleware", "django.middleware.common.CommonMiddleware", diff --git a/{{cookiecutter.project_slug}}/config/settings/local.py b/{{cookiecutter.project_slug}}/config/settings/local.py index 2ab0a7cb..015d8aff 100644 --- a/{{cookiecutter.project_slug}}/config/settings/local.py +++ b/{{cookiecutter.project_slug}}/config/settings/local.py @@ -42,6 +42,14 @@ EMAIL_BACKEND = env( ) {%- endif %} +{%- if cookiecutter.use_whitenoise == 'y' %} + +# WhiteNoise +# ------------------------------------------------------------------------------ +# http://whitenoise.evans.io/en/latest/django.html#using-whitenoise-in-development +INSTALLED_APPS = ["whitenoise.runserver_nostatic"] + INSTALLED_APPS # noqa F405 +{% endif %} + # django-debug-toolbar # ------------------------------------------------------------------------------ # https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#prerequisites diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index 712f2bf4..22a2acae 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -194,14 +194,7 @@ ANYMAIL = { "MAILGUN_API_URL": env("MAILGUN_API_URL", default="https://api.mailgun.net/v3"), } -{% if cookiecutter.use_whitenoise == 'y' -%} -# WhiteNoise -# ------------------------------------------------------------------------------ -# http://whitenoise.evans.io/en/latest/django.html#enable-whitenoise -MIDDLEWARE.insert(1, "whitenoise.middleware.WhiteNoiseMiddleware") # noqa F405 - -{% endif %} -{%- if cookiecutter.use_compressor == 'y' -%} +{% if cookiecutter.use_compressor == 'y' -%} # django-compressor # ------------------------------------------------------------------------------ # https://django-compressor.readthedocs.io/en/latest/settings/#django.conf.settings.COMPRESS_ENABLED From 8a1ec53a74cb2cf11ad2405d8d21db14a224cc74 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Sat, 9 Nov 2019 11:00:30 +0000 Subject: [PATCH 077/146] Update gunicorn from 19.9.0 to 20.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 d65a0cbc..8d32e81a 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -2,7 +2,7 @@ -r ./base.txt -gunicorn==19.9.0 # https://github.com/benoitc/gunicorn +gunicorn==20.0.0 # https://github.com/benoitc/gunicorn psycopg2==2.8.3 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 {%- if cookiecutter.use_whitenoise == 'n' %} Collectfast==1.3.1 # https://github.com/antonagestam/collectfast From eeda7dfe33c2bd390d5a784cd4f03251c1302001 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Sat, 9 Nov 2019 11:00:33 +0000 Subject: [PATCH 078/146] Update sentry-sdk from 0.13.1 to 0.13.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 d65a0cbc..c1fdd2a3 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.3.1 # https://github.com/antonagestam/collectfast {%- endif %} {%- if cookiecutter.use_sentry == "y" %} -sentry-sdk==0.13.1 # https://github.com/getsentry/sentry-python +sentry-sdk==0.13.2 # https://github.com/getsentry/sentry-python {%- endif %} # Django From fd5e9be58bd6ff1feea5c5edeae603614f3e6d2e Mon Sep 17 00:00:00 2001 From: browniebroke Date: Sat, 9 Nov 2019 11:00:37 +0000 Subject: [PATCH 079/146] Update pytest-django from 3.6.0 to 3.7.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 baee3196..4a1c4209 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -33,4 +33,4 @@ 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.5 # https://github.com/django-extensions/django-extensions django-coverage-plugin==1.6.0 # https://github.com/nedbat/django_coverage_plugin -pytest-django==3.6.0 # https://github.com/pytest-dev/pytest-django +pytest-django==3.7.0 # https://github.com/pytest-dev/pytest-django From a38c61369e0b9fc2864b137976c49f4697b199aa Mon Sep 17 00:00:00 2001 From: browniebroke Date: Tue, 12 Nov 2019 11:00:32 +0000 Subject: [PATCH 080/146] Update django-debug-toolbar from 2.0 to 2.1 --- {{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 4a1c4209..2f7234bc 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -30,7 +30,7 @@ pre-commit==1.20.0 # https://github.com/pre-commit/pre-commit # ------------------------------------------------------------------------------ factory-boy==2.12.0 # https://github.com/FactoryBoy/factory_boy -django-debug-toolbar==2.0 # https://github.com/jazzband/django-debug-toolbar +django-debug-toolbar==2.1 # https://github.com/jazzband/django-debug-toolbar django-extensions==2.2.5 # https://github.com/django-extensions/django-extensions django-coverage-plugin==1.6.0 # https://github.com/nedbat/django_coverage_plugin pytest-django==3.7.0 # https://github.com/pytest-dev/pytest-django From 9a3391a6eb1a54fc150a9c5f9edea347b87865dc Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Tue, 12 Nov 2019 14:05:30 +0000 Subject: [PATCH 081/146] Update image in README closes #2282 --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 4be3c4bc..2fba0979 100644 --- a/README.rst +++ b/README.rst @@ -108,7 +108,7 @@ Projects that provide financial support to the maintainers: Two Scoops of Django 1.11 ~~~~~~~~~~~~~~~~~~~~~~~~~ -.. image:: https://cdn.shopify.com/s/files/1/0304/6901/products/tsd-111-alpha_medium.jpg?v=1499531513 +.. image:: https://cdn.shopify.com/s/files/1/0304/6901/products/2017-06-29-tsd11-sticker-02.png :name: Two Scoops of Django 1.11 Cover :align: center :alt: Two Scoops of Django From ff0122acd6de47b43be6ebf251180261483b1588 Mon Sep 17 00:00:00 2001 From: Dani Hodovic Date: Wed, 13 Nov 2019 23:28:38 +0100 Subject: [PATCH 082/146] Use pytest-django --reuse-db for faster tests Pytest-django allows you to re-use database setups between tests for quicker test runs. This is especially useful for large projects with many migrations. For example, here's a project of mine with 40+ migrations: with --reuse-db ``` pytest --reuse-db 2.54s user 0.35s system 108% cpu 2.669 total ``` without --reuse-db ``` pytest 7.40s user 0.34s system 50% cpu 15.240 total ``` Caveat: if your model happens to change you need to manually --create-db to ensure migrations are applied. https://pytest-django.readthedocs.io/en/latest/database.html#reuse-db-reuse-the-testing-database-between-test-runs --- {{cookiecutter.project_slug}}/pytest.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/pytest.ini b/{{cookiecutter.project_slug}}/pytest.ini index 52b48ab0..e3b2248d 100644 --- a/{{cookiecutter.project_slug}}/pytest.ini +++ b/{{cookiecutter.project_slug}}/pytest.ini @@ -1,5 +1,5 @@ [pytest] -addopts = --ds=config.settings.test +addopts = --ds=config.settings.test --reuse-db python_files = tests.py test_*.py {%- if cookiecutter.js_task_runner != 'None' %} norecursedirs = node_modules From ecb2b259947db3bc5cd6ca67114473a63b16aad3 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 13 Nov 2019 15:22:52 -0800 Subject: [PATCH 083/146] Update tox from 3.14.0 to 3.14.1 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 66786b19..451d4281 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,7 +9,7 @@ flake8==3.7.8 # Testing # ------------------------------------------------------------------------------ -tox==3.14.0 +tox==3.14.1 pytest==5.2.2 pytest_cases==1.11.5 pytest-cookies==0.4.0 From 7a9f133fc3cd8a6fafb069b3614d0763adcc1fb1 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Fri, 15 Nov 2019 11:00:32 +0000 Subject: [PATCH 084/146] Update pytest from 5.2.2 to 5.2.3 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 451d4281..eccaa000 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,7 @@ flake8==3.7.8 # Testing # ------------------------------------------------------------------------------ tox==3.14.1 -pytest==5.2.2 +pytest==5.2.3 pytest_cases==1.11.5 pytest-cookies==0.4.0 pytest-xdist==1.30.0 From 0bd04dd5b30dfe885dcc38f45a3f9a11b04928d5 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Fri, 15 Nov 2019 11:00:33 +0000 Subject: [PATCH 085/146] Update pytest from 5.2.2 to 5.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 2f7234bc..d338f929 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -12,7 +12,7 @@ psycopg2-binary==2.8.4 # https://github.com/psycopg/psycopg2 # Testing # ------------------------------------------------------------------------------ mypy==0.740 # https://github.com/python/mypy -pytest==5.2.2 # https://github.com/pytest-dev/pytest +pytest==5.2.3 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.2 # https://github.com/Frozenball/pytest-sugar # Code quality From 44e404845b050afa8607e3ade1626c95bf7cf962 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Sat, 16 Nov 2019 11:00:31 +0000 Subject: [PATCH 086/146] Update pytest from 5.2.3 to 5.2.4 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index eccaa000..966c944a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,7 @@ flake8==3.7.8 # Testing # ------------------------------------------------------------------------------ tox==3.14.1 -pytest==5.2.3 +pytest==5.2.4 pytest_cases==1.11.5 pytest-cookies==0.4.0 pytest-xdist==1.30.0 From 526f135e85596fe873f458ab799383d85f19b356 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Sat, 16 Nov 2019 11:00:32 +0000 Subject: [PATCH 087/146] Update pytest from 5.2.3 to 5.2.4 --- {{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 d338f929..bc8e6651 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -12,7 +12,7 @@ psycopg2-binary==2.8.4 # https://github.com/psycopg/psycopg2 # Testing # ------------------------------------------------------------------------------ mypy==0.740 # https://github.com/python/mypy -pytest==5.2.3 # https://github.com/pytest-dev/pytest +pytest==5.2.4 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.2 # https://github.com/Frozenball/pytest-sugar # Code quality From 7a6bbcb0835bef80d0f2fb52d5df27ef9a2d3c8e Mon Sep 17 00:00:00 2001 From: browniebroke Date: Mon, 18 Nov 2019 11:00:42 +0000 Subject: [PATCH 088/146] Update pytest_cases from 1.11.5 to 1.11.7 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 966c944a..9a3d9888 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,7 +11,7 @@ flake8==3.7.8 # ------------------------------------------------------------------------------ tox==3.14.1 pytest==5.2.4 -pytest_cases==1.11.5 +pytest_cases==1.11.7 pytest-cookies==0.4.0 pytest-xdist==1.30.0 pyyaml==5.1.2 From 5a7e6671d6050fd620d24c73486aee50d0a1372e Mon Sep 17 00:00:00 2001 From: browniebroke Date: Wed, 20 Nov 2019 11:00:33 +0000 Subject: [PATCH 089/146] Update pytest from 5.2.4 to 5.3.0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 9a3d9888..73c787dd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,7 @@ flake8==3.7.8 # Testing # ------------------------------------------------------------------------------ tox==3.14.1 -pytest==5.2.4 +pytest==5.3.0 pytest_cases==1.11.7 pytest-cookies==0.4.0 pytest-xdist==1.30.0 From cdd9205075eea1631f86522e210fd245daf88335 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Wed, 20 Nov 2019 11:00:35 +0000 Subject: [PATCH 090/146] Update pytest from 5.2.4 to 5.3.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 bc8e6651..61ab281f 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -12,7 +12,7 @@ psycopg2-binary==2.8.4 # https://github.com/psycopg/psycopg2 # Testing # ------------------------------------------------------------------------------ mypy==0.740 # https://github.com/python/mypy -pytest==5.2.4 # https://github.com/pytest-dev/pytest +pytest==5.3.0 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.2 # https://github.com/Frozenball/pytest-sugar # Code quality From 4daf3b9769203f21d9a16e0a546f0eafecf2f454 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Thu, 21 Nov 2019 11:00:33 +0000 Subject: [PATCH 091/146] Update django-storages from 1.7.2 to 1.8 --- {{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 d5012532..c89de8f0 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -14,7 +14,7 @@ sentry-sdk==0.13.2 # https://github.com/getsentry/sentry-python # Django # ------------------------------------------------------------------------------ {%- if cookiecutter.cloud_provider == 'AWS' %} -django-storages[boto3]==1.7.2 # https://github.com/jschneier/django-storages +django-storages[boto3]==1.8 # https://github.com/jschneier/django-storages {%- elif cookiecutter.cloud_provider == 'GCP' %} django-storages[google]==1.7.2 # https://github.com/jschneier/django-storages {%- endif %} From 9481a5a39097d010daa44e57d28e71247b2bc357 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Thu, 21 Nov 2019 11:00:34 +0000 Subject: [PATCH 092/146] Update django-storages from 1.7.2 to 1.8 --- {{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 c89de8f0..e20dff51 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -16,6 +16,6 @@ sentry-sdk==0.13.2 # https://github.com/getsentry/sentry-python {%- if cookiecutter.cloud_provider == 'AWS' %} django-storages[boto3]==1.8 # https://github.com/jschneier/django-storages {%- elif cookiecutter.cloud_provider == 'GCP' %} -django-storages[google]==1.7.2 # https://github.com/jschneier/django-storages +django-storages[google]==1.8 # https://github.com/jschneier/django-storages {%- endif %} django-anymail[mailgun]==7.0.0 # https://github.com/anymail/django-anymail From 528027f2b0f2f6e7374ca660466c25cf00bdef5e Mon Sep 17 00:00:00 2001 From: browniebroke Date: Sat, 23 Nov 2019 11:00:30 +0000 Subject: [PATCH 093/146] Update pytest_cases from 1.11.7 to 1.11.8 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 73c787dd..18f2e122 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,7 +11,7 @@ flake8==3.7.8 # ------------------------------------------------------------------------------ tox==3.14.1 pytest==5.3.0 -pytest_cases==1.11.7 +pytest_cases==1.11.8 pytest-cookies==0.4.0 pytest-xdist==1.30.0 pyyaml==5.1.2 From b014121810e3332acbb15ba98e57e859086b0fb7 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Sat, 23 Nov 2019 11:00:33 +0000 Subject: [PATCH 094/146] Update gunicorn from 20.0.0 to 20.0.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 e20dff51..93116cbd 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -2,7 +2,7 @@ -r ./base.txt -gunicorn==20.0.0 # https://github.com/benoitc/gunicorn +gunicorn==20.0.2 # https://github.com/benoitc/gunicorn psycopg2==2.8.3 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 {%- if cookiecutter.use_whitenoise == 'n' %} Collectfast==1.3.1 # https://github.com/antonagestam/collectfast From 09d95d8ab464498bc28ef5755637ed378bb1aca3 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Sat, 23 Nov 2019 11:00:37 +0000 Subject: [PATCH 095/146] Update django-crispy-forms from 1.8.0 to 1.8.1 --- {{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 dbdee176..6ca90421 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -23,7 +23,7 @@ django==2.2.7 # 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 -django-crispy-forms==1.8.0 # https://github.com/django-crispy-forms/django-crispy-forms +django-crispy-forms==1.8.1 # 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 {%- endif %} From dce02bae70f6681c88b0d3bad92ae30a6cc9e9f3 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Sun, 24 Nov 2019 11:00:31 +0000 Subject: [PATCH 096/146] Update pylint-django from 2.0.12 to 2.0.13 --- {{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 61ab281f..5cfcce2b 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -20,7 +20,7 @@ pytest-sugar==0.9.2 # https://github.com/Frozenball/pytest-sugar flake8==3.7.8 # https://github.com/PyCQA/flake8 coverage==4.5.4 # https://github.com/nedbat/coveragepy black==19.10b0 # https://github.com/ambv/black -pylint-django==2.0.12 # https://github.com/PyCQA/pylint-django +pylint-django==2.0.13 # https://github.com/PyCQA/pylint-django {%- if cookiecutter.use_celery == 'y' %} pylint-celery==0.3 # https://github.com/PyCQA/pylint-celery {%- endif %} From fbd0fcbb6104cfcf84a70dcb7f45ee2152a8df66 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Mon, 25 Nov 2019 11:00:33 +0000 Subject: [PATCH 097/146] Update sentry-sdk from 0.13.2 to 0.13.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 e20dff51..4722ce9c 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.3.1 # https://github.com/antonagestam/collectfast {%- endif %} {%- if cookiecutter.use_sentry == "y" %} -sentry-sdk==0.13.2 # https://github.com/getsentry/sentry-python +sentry-sdk==0.13.3 # https://github.com/getsentry/sentry-python {%- endif %} # Django From 82c8b5127226398c537fba897437c62cfdf0c622 Mon Sep 17 00:00:00 2001 From: Harry Moreno Date: Mon, 25 Nov 2019 16:43:30 -0500 Subject: [PATCH 098/146] Make update form button look like a button without `ban-primary` the button looks like some floating text. --- .../templates/users/user_form.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/users/user_form.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/users/user_form.html index 6a86a273..e9da0d48 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/users/user_form.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/users/user_form.html @@ -10,7 +10,7 @@ {{ form|crispy }}
- +
From 832275a792b2ae0899b68bdacb75fa5ce6a34d2d Mon Sep 17 00:00:00 2001 From: browniebroke Date: Tue, 26 Nov 2019 11:00:32 +0000 Subject: [PATCH 099/146] Update gunicorn from 20.0.2 to 20.0.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 846cb578..c0a66efc 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -2,7 +2,7 @@ -r ./base.txt -gunicorn==20.0.2 # https://github.com/benoitc/gunicorn +gunicorn==20.0.3 # https://github.com/benoitc/gunicorn psycopg2==2.8.3 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 {%- if cookiecutter.use_whitenoise == 'n' %} Collectfast==1.3.1 # https://github.com/antonagestam/collectfast From 2a25e523e547d96dd0a6b40fc1acf554dffeffe4 Mon Sep 17 00:00:00 2001 From: Harry Moreno Date: Tue, 26 Nov 2019 14:51:48 -0500 Subject: [PATCH 100/146] Add self to contributors.rst --- CONTRIBUTORS.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 56416abf..53edb28e 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -116,6 +116,7 @@ Listed in alphabetical order. Gilbishkosma `@Gilbishkosma`_ Hamish Durkin `@durkode`_ Hana Quadara `@hanaquadara`_ + Harry Moreno `@morenoh149`_ @morenoh149 Harry Percival `@hjwp`_ Hendrik Schneider `@hendrikschneider`_ Henrique G. G. Pereira `@ikkebr`_ @@ -307,6 +308,7 @@ Listed in alphabetical order. .. _@minho42: https://github.com/minho42 .. _@mjsisley: https://github.com/mjsisley .. _@mknapper1: https://github.com/mknapper1 +.. _@morenoh149: https://github.com/morenoh149 .. _@mostaszewski: https://github.com/mostaszewski .. _@mozillazg: https://github.com/mozillazg .. _@mrcoles: https://github.com/mrcoles From a1669324e8c535be925557bc555b11e77e838b94 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 27 Nov 2019 02:41:09 -0800 Subject: [PATCH 101/146] Update pytest from 5.3.0 to 5.3.1 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 18f2e122..5f7c2e32 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,7 @@ flake8==3.7.8 # Testing # ------------------------------------------------------------------------------ tox==3.14.1 -pytest==5.3.0 +pytest==5.3.1 pytest_cases==1.11.8 pytest-cookies==0.4.0 pytest-xdist==1.30.0 From 6a302ec703b28ce2393480123432fe39560a9cb6 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Wed, 27 Nov 2019 11:00:34 +0000 Subject: [PATCH 102/146] Update gunicorn from 20.0.3 to 20.0.4 --- {{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 c0a66efc..7be7f97c 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -2,7 +2,7 @@ -r ./base.txt -gunicorn==20.0.3 # https://github.com/benoitc/gunicorn +gunicorn==20.0.4 # https://github.com/benoitc/gunicorn psycopg2==2.8.3 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 {%- if cookiecutter.use_whitenoise == 'n' %} Collectfast==1.3.1 # https://github.com/antonagestam/collectfast From 4283ca76a4b53b33c7fbf272f87abe888cc183ba Mon Sep 17 00:00:00 2001 From: browniebroke Date: Wed, 27 Nov 2019 11:00:38 +0000 Subject: [PATCH 103/146] Update sentry-sdk from 0.13.3 to 0.13.4 --- {{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 c0a66efc..850d1f02 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.3.1 # https://github.com/antonagestam/collectfast {%- endif %} {%- if cookiecutter.use_sentry == "y" %} -sentry-sdk==0.13.3 # https://github.com/getsentry/sentry-python +sentry-sdk==0.13.4 # https://github.com/getsentry/sentry-python {%- endif %} # Django From 9ec808e7f415c9bda68caec167e3f722ce743ab1 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Thu, 28 Nov 2019 11:00:32 +0000 Subject: [PATCH 104/146] Update pytest from 5.3.0 to 5.3.1 --- {{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 5cfcce2b..3ebc2320 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -12,7 +12,7 @@ psycopg2-binary==2.8.4 # https://github.com/psycopg/psycopg2 # Testing # ------------------------------------------------------------------------------ mypy==0.740 # https://github.com/python/mypy -pytest==5.3.0 # https://github.com/pytest-dev/pytest +pytest==5.3.1 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.2 # https://github.com/Frozenball/pytest-sugar # Code quality From c76b3066d63efd45f62d4d9db43a19f4bd98c441 Mon Sep 17 00:00:00 2001 From: Denis Savran Date: Thu, 28 Nov 2019 23:16:06 +0300 Subject: [PATCH 105/146] Upgrade to Traefik v2 --- CONTRIBUTORS.rst | 2 + .../compose/production/traefik/Dockerfile | 4 +- .../compose/production/traefik/traefik.toml | 41 ------------ .../compose/production/traefik/traefik.yml | 67 +++++++++++++++++++ 4 files changed, 71 insertions(+), 43 deletions(-) delete mode 100644 {{cookiecutter.project_slug}}/compose/production/traefik/traefik.toml create mode 100644 {{cookiecutter.project_slug}}/compose/production/traefik/traefik.yml diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 53edb28e..46afc393 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -102,6 +102,7 @@ Listed in alphabetical order. Demetris Stavrou `@demestav`_ Denis Bobrov `@delneg`_ Denis Orehovsky `@apirobot`_ + Denis Savran `@blaxpy`_ Diane Chen `@purplediane`_ @purplediane88 Dónal Adams `@epileptic-fish`_ Dong Huynh `@trungdong`_ @@ -226,6 +227,7 @@ Listed in alphabetical order. .. _@arruda: https://github.com/arruda .. _@bertdemiranda: https://github.com/bertdemiranda .. _@bittner: https://github.com/bittner +.. _@blaxpy: https://github.com/blaxpy .. _@bloodpet: https://github.com/bloodpet .. _@blopker: https://github.com/blopker .. _@bogdal: https://github.com/bogdal diff --git a/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile index d7363a1a..746aa2b4 100644 --- a/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile @@ -1,5 +1,5 @@ -FROM traefik:1.7-alpine +FROM traefik:v2.0 RUN mkdir -p /etc/traefik/acme RUN touch /etc/traefik/acme/acme.json RUN chmod 600 /etc/traefik/acme/acme.json -COPY ./compose/production/traefik/traefik.toml /etc/traefik +COPY ./compose/production/traefik/traefik.yml /etc/traefik diff --git a/{{cookiecutter.project_slug}}/compose/production/traefik/traefik.toml b/{{cookiecutter.project_slug}}/compose/production/traefik/traefik.toml deleted file mode 100644 index 0f2abe8a..00000000 --- a/{{cookiecutter.project_slug}}/compose/production/traefik/traefik.toml +++ /dev/null @@ -1,41 +0,0 @@ -logLevel = "INFO" -defaultEntryPoints = ["http", "https"] - -# Entrypoints, http and https -[entryPoints] - # http should be redirected to https - [entryPoints.http] - address = ":80" - [entryPoints.http.redirect] - entryPoint = "https" - # https is the default - [entryPoints.https] - address = ":443" - [entryPoints.https.tls] - -# Enable ACME (Let's Encrypt): automatic SSL -[acme] -# Email address used for registration -email = "{{ cookiecutter.email }}" -storage = "/etc/traefik/acme/acme.json" -entryPoint = "https" -onDemand = false -OnHostRule = true - # Use a HTTP-01 acme challenge rather than TLS-SNI-01 challenge - [acme.httpChallenge] - entryPoint = "http" - -[file] -[backends] - [backends.django] - [backends.django.servers.server1] - url = "http://django:5000" - -[frontends] - [frontends.django] - backend = "django" - passHostHeader = true - [frontends.django.headers] - HostsProxyHeaders = ['X-CSRFToken'] - [frontends.django.routes.dr1] - rule = "Host:{{ cookiecutter.domain_name }}" diff --git a/{{cookiecutter.project_slug}}/compose/production/traefik/traefik.yml b/{{cookiecutter.project_slug}}/compose/production/traefik/traefik.yml new file mode 100644 index 00000000..324c62af --- /dev/null +++ b/{{cookiecutter.project_slug}}/compose/production/traefik/traefik.yml @@ -0,0 +1,67 @@ +log: + level: INFO + +entryPoints: + web: + # http + address: ":80" + + web-secure: + # https + address: ":443" + +certificatesResolvers: + letsencrypt: + # https://docs.traefik.io/master/https/acme/#lets-encrypt + acme: + email: "{{ cookiecutter.email }}" + storage: /etc/traefik/acme/acme.json + # https://docs.traefik.io/master/https/acme/#httpchallenge + httpChallenge: + entryPoint: web + +http: + routers: + web-router: + rule: "Host(`{{ cookiecutter.domain_name }}`)" + entryPoints: + - web + middlewares: + - redirect + - csrf + service: django + + web-secure-router: + rule: "Host(`{{ cookiecutter.domain_name }}`)" + entryPoints: + - web-secure + middlewares: + - csrf + service: django + tls: + # https://docs.traefik.io/master/routing/routers/#certresolver + certResolver: letsencrypt + + middlewares: + redirect: + # https://docs.traefik.io/master/middlewares/redirectscheme/ + redirectScheme: + scheme: https + permanent: true + csrf: + # https://docs.traefik.io/master/middlewares/headers/#hostsproxyheaders + # https://docs.djangoproject.com/en/dev/ref/csrf/#ajax + headers: + hostsProxyHeaders: ['X-CSRFToken'] + + services: + django: + loadBalancer: + servers: + - url: http://django:5000 + +providers: + # https://docs.traefik.io/master/providers/file/ + file: + filename: /etc/traefik/traefik.yml + watch: true From 1453b328916de4c78fbcdd85513eac83004823a1 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Sat, 30 Nov 2019 11:00:31 +0000 Subject: [PATCH 106/146] Update mypy from 0.740 to 0.750 --- {{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 5cfcce2b..df378239 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -11,7 +11,7 @@ psycopg2-binary==2.8.4 # https://github.com/psycopg/psycopg2 # Testing # ------------------------------------------------------------------------------ -mypy==0.740 # https://github.com/python/mypy +mypy==0.750 # https://github.com/python/mypy pytest==5.3.0 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.2 # https://github.com/Frozenball/pytest-sugar From b638ce0a1b523de0c38a576db4829c584d41d6f4 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Mon, 2 Dec 2019 11:00:31 +0000 Subject: [PATCH 107/146] Update django from 2.2.7 to 2.2.8 --- {{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 6ca90421..6ac35587 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.7 # pyup: < 3.0 # https://www.djangoproject.com/ +django==2.2.8 # 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 2214951bbe298d51343f8ee5f743c35e8a6736a9 Mon Sep 17 00:00:00 2001 From: Jelmert Date: Tue, 3 Dec 2019 11:19:01 +0100 Subject: [PATCH 108/146] updated werkzeug from 0.14.1 to 0.16.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 3ebc2320..d4453daa 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -1,6 +1,6 @@ -r ./base.txt -Werkzeug==0.14.1 # pyup: < 0.15 # https://github.com/pallets/werkzeug +Werkzeug==0.16.0 # https://github.com/pallets/werkzeug ipdb==0.12.2 # https://github.com/gotcha/ipdb Sphinx==2.2.1 # https://github.com/sphinx-doc/sphinx {%- if cookiecutter.use_docker == 'y' %} From 4a185510e317eceb721ca322c947a865a36225c5 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Tue, 3 Dec 2019 11:00:33 +0000 Subject: [PATCH 109/146] Update tox from 3.14.1 to 3.14.2 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 5f7c2e32..ffde9100 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,7 +9,7 @@ flake8==3.7.8 # Testing # ------------------------------------------------------------------------------ -tox==3.14.1 +tox==3.14.2 pytest==5.3.1 pytest_cases==1.11.8 pytest-cookies==0.4.0 From a7ed8e9fee2a478f3769c3a309d6320c1e6c350c Mon Sep 17 00:00:00 2001 From: browniebroke Date: Tue, 3 Dec 2019 11:00:37 +0000 Subject: [PATCH 110/146] Update pyyaml from 5.1.2 to 5.2 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 5f7c2e32..b032f217 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,4 +14,4 @@ pytest==5.3.1 pytest_cases==1.11.8 pytest-cookies==0.4.0 pytest-xdist==1.30.0 -pyyaml==5.1.2 +pyyaml==5.2 From 3140fe74cabf27e28a8b0acd33e1efe9ef2559e3 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Tue, 3 Dec 2019 11:00:42 +0000 Subject: [PATCH 111/146] Update sphinx 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 3ebc2320..4fd01d7c 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -2,7 +2,7 @@ Werkzeug==0.14.1 # pyup: < 0.15 # https://github.com/pallets/werkzeug ipdb==0.12.2 # https://github.com/gotcha/ipdb -Sphinx==2.2.1 # https://github.com/sphinx-doc/sphinx +Sphinx==2.2.2 # https://github.com/sphinx-doc/sphinx {%- if cookiecutter.use_docker == 'y' %} psycopg2==2.8.3 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 {%- else %} From 79da1482a533201267d69cb789cbde8a62748e63 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Tue, 3 Dec 2019 08:01:37 -0800 Subject: [PATCH 112/146] Update flake8 from 3.7.8 to 3.7.9 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 4a75eef5..ab1451d3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ binaryornot==0.4.4 # Code quality # ------------------------------------------------------------------------------ black==19.10b0 -flake8==3.7.8 +flake8==3.7.9 # Testing # ------------------------------------------------------------------------------ From 112972d881159f5dbc468013cec331a0f715aecf Mon Sep 17 00:00:00 2001 From: browniebroke Date: Wed, 4 Dec 2019 11:00:32 +0000 Subject: [PATCH 113/146] Update ipdb from 0.12.2 to 0.12.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 28bcb4a5..6f19183f 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -1,7 +1,7 @@ -r ./base.txt Werkzeug==0.16.0 # https://github.com/pallets/werkzeug -ipdb==0.12.2 # https://github.com/gotcha/ipdb +ipdb==0.12.3 # https://github.com/gotcha/ipdb Sphinx==2.2.2 # https://github.com/sphinx-doc/sphinx {%- if cookiecutter.use_docker == 'y' %} psycopg2==2.8.3 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 From e7923c6c5c0750b8823e260f63d16b82a137271e Mon Sep 17 00:00:00 2001 From: browniebroke Date: Wed, 4 Dec 2019 11:00:35 +0000 Subject: [PATCH 114/146] Update flake8 from 3.7.8 to 3.7.9 --- {{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 28bcb4a5..aa740145 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -17,7 +17,7 @@ pytest-sugar==0.9.2 # https://github.com/Frozenball/pytest-sugar # Code quality # ------------------------------------------------------------------------------ -flake8==3.7.8 # https://github.com/PyCQA/flake8 +flake8==3.7.9 # https://github.com/PyCQA/flake8 coverage==4.5.4 # https://github.com/nedbat/coveragepy black==19.10b0 # https://github.com/ambv/black pylint-django==2.0.13 # https://github.com/PyCQA/pylint-django From 97880e5046a4af5f2042a7c6144e012fe6e2e356 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Fri, 6 Dec 2019 11:00:30 +0000 Subject: [PATCH 115/146] Update sentry-sdk from 0.13.4 to 0.13.5 --- {{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 69217ab3..438ccca6 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.3.1 # https://github.com/antonagestam/collectfast {%- endif %} {%- if cookiecutter.use_sentry == "y" %} -sentry-sdk==0.13.4 # https://github.com/getsentry/sentry-python +sentry-sdk==0.13.5 # https://github.com/getsentry/sentry-python {%- endif %} # Django From a88b6b04b6c13b2d9f7f7f794680326786632a3b Mon Sep 17 00:00:00 2001 From: Yuchen Xie <4576282+mapx@users.noreply.github.com> Date: Mon, 9 Dec 2019 09:55:37 +0800 Subject: [PATCH 116/146] Speed up django image build process, and reduce its size --- .../compose/production/django/Dockerfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile index b0861d60..e63241f4 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile @@ -57,13 +57,11 @@ RUN chmod +x /start-flower {%- endif %} {%- if cookiecutter.js_task_runner == 'Gulp' %} -COPY --from=client-builder /app /app +COPY --from=client-builder --chown=django:django /app /app {% else %} -COPY . /app +COPY --chown=django:django . /app {%- endif %} -RUN chown -R django /app - USER django WORKDIR /app From 0f515974cb85e1c948bbdaae7874fd853ce35e56 Mon Sep 17 00:00:00 2001 From: Dani Hodovic Date: Wed, 11 Dec 2019 14:58:21 +0100 Subject: [PATCH 117/146] Remove mypy defaults and set django-stubs setting https://mypy.readthedocs.io/en/latest/config_file.html ignore_errors = False strict_optional = True Are both set to these values by default. No need to set them in the config. ```toml [mypy.plugins.django-stubs] django_settings_module = config.settings.local ``` mypy.plugins.django-stubs requires django_settings_module to be set. https://github.com/typeddjango/django-stubs#configuration --- {{cookiecutter.project_slug}}/setup.cfg | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/setup.cfg b/{{cookiecutter.project_slug}}/setup.cfg index 42b63861..f7cd01cb 100644 --- a/{{cookiecutter.project_slug}}/setup.cfg +++ b/{{cookiecutter.project_slug}}/setup.cfg @@ -9,13 +9,14 @@ exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules [mypy] python_version = 3.7 check_untyped_defs = True -ignore_errors = False ignore_missing_imports = True -strict_optional = True warn_unused_ignores = True warn_redundant_casts = True warn_unused_configs = True +[mypy.plugins.django-stubs] +django_settings_module = config.settings.test + [mypy-*.migrations.*] # Django migrations should not produce any errors: ignore_errors = True From 37bc459796103b7ba0ea6b5009f516b507d1fc0f Mon Sep 17 00:00:00 2001 From: browniebroke Date: Thu, 12 Dec 2019 08:00:31 -0300 Subject: [PATCH 118/146] Update pytest_cases from 1.11.8 to 1.11.9 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index ab1451d3..8cd8c53a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,7 +11,7 @@ flake8==3.7.9 # ------------------------------------------------------------------------------ tox==3.14.2 pytest==5.3.1 -pytest_cases==1.11.8 +pytest_cases==1.11.9 pytest-cookies==0.4.0 pytest-xdist==1.30.0 pyyaml==5.2 From c59062a496fb07033308dc8a845988fb98fe60ae Mon Sep 17 00:00:00 2001 From: browniebroke Date: Thu, 12 Dec 2019 08:00:35 -0300 Subject: [PATCH 119/146] Update django-model-utils from 3.2.0 to 4.0.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 6ac35587..c195e796 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -21,7 +21,7 @@ flower==0.9.3 # https://github.com/mher/flower # ------------------------------------------------------------------------------ django==2.2.8 # 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-model-utils==4.0.0 # https://github.com/jazzband/django-model-utils django-allauth==0.40.0 # https://github.com/pennersr/django-allauth django-crispy-forms==1.8.1 # https://github.com/django-crispy-forms/django-crispy-forms {%- if cookiecutter.use_compressor == "y" %} From d4189097146b04db04a2430f62cd43f7fbd04a6c Mon Sep 17 00:00:00 2001 From: browniebroke Date: Fri, 13 Dec 2019 08:00:31 -0300 Subject: [PATCH 120/146] Update whitenoise from 4.1.4 to 5.0.1 --- {{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 6ac35587..9d930428 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.2.0 # https://github.com/hynek/argon2_cffi {%- if cookiecutter.use_whitenoise == 'y' %} -whitenoise==4.1.4 # https://github.com/evansd/whitenoise +whitenoise==5.0.1 # https://github.com/evansd/whitenoise {%- endif %} redis==3.3.11 # https://github.com/antirez/redis {%- if cookiecutter.use_celery == "y" %} From 6ce4b13d83257572a6f12abd9075e0d74475f7e6 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Fri, 13 Dec 2019 08:00:36 -0300 Subject: [PATCH 121/146] Update djangorestframework from 3.10.3 to 3.11.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 6ac35587..1eaca3d3 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.3 # https://github.com/encode/django-rest-framework +djangorestframework==3.11.0 # https://github.com/encode/django-rest-framework coreapi==2.3.3 # https://github.com/core-api/python-client From d085a9c43236f2f821c32317d5da3da2c8b4bfa4 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Sat, 14 Dec 2019 08:00:29 -0300 Subject: [PATCH 122/146] Update django-redis from 4.10.0 to 4.11.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 69869e14..926a02c0 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -27,7 +27,7 @@ django-crispy-forms==1.8.1 # https://github.com/django-crispy-forms/django-cris {%- if cookiecutter.use_compressor == "y" %} django-compressor==2.3 # https://github.com/django-compressor/django-compressor {%- endif %} -django-redis==4.10.0 # https://github.com/niwinz/django-redis +django-redis==4.11.0 # https://github.com/niwinz/django-redis # Django REST Framework djangorestframework==3.11.0 # https://github.com/encode/django-rest-framework From 32e42cb0ec38839fec378757755c7f94f3be065d Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sun, 15 Dec 2019 02:56:41 -0800 Subject: [PATCH 123/146] Update pytest from 5.3.1 to 5.3.2 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 8cd8c53a..0a2c0639 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,7 @@ flake8==3.7.9 # Testing # ------------------------------------------------------------------------------ tox==3.14.2 -pytest==5.3.1 +pytest==5.3.2 pytest_cases==1.11.9 pytest-cookies==0.4.0 pytest-xdist==1.30.0 From b6a524c346a0bd22d7c7b8a7f561ab7bba449343 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Sun, 15 Dec 2019 08:00:29 -0300 Subject: [PATCH 124/146] Update coverage from 4.5.4 to 5.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 5b8f3279..ae112a94 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -18,7 +18,7 @@ pytest-sugar==0.9.2 # https://github.com/Frozenball/pytest-sugar # Code quality # ------------------------------------------------------------------------------ flake8==3.7.9 # https://github.com/PyCQA/flake8 -coverage==4.5.4 # https://github.com/nedbat/coveragepy +coverage==5.0 # https://github.com/nedbat/coveragepy black==19.10b0 # https://github.com/ambv/black pylint-django==2.0.13 # https://github.com/PyCQA/pylint-django {%- if cookiecutter.use_celery == 'y' %} From 8211a83f3a21381060c8767049e676f5cf609ef5 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Mon, 16 Dec 2019 08:00:30 -0300 Subject: [PATCH 125/146] Update celery from 4.3.0 to 4.4.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 926a02c0..de4e8252 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -10,7 +10,7 @@ whitenoise==5.0.1 # https://github.com/evansd/whitenoise {%- endif %} redis==3.3.11 # https://github.com/antirez/redis {%- if cookiecutter.use_celery == "y" %} -celery==4.3.0 # pyup: < 5.0 # https://github.com/celery/celery +celery==4.4.0 # pyup: < 5.0 # https://github.com/celery/celery django-celery-beat==1.5.0 # https://github.com/celery/django-celery-beat {%- if cookiecutter.use_docker == 'y' %} flower==0.9.3 # https://github.com/mher/flower From acd63b14b8a1c4d0427c56ffd33bfb4c0b2280b2 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Mon, 16 Dec 2019 08:00:34 -0300 Subject: [PATCH 126/146] Update sphinx from 2.2.2 to 2.3.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 ae112a94..1b54f001 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -2,7 +2,7 @@ Werkzeug==0.16.0 # https://github.com/pallets/werkzeug ipdb==0.12.3 # https://github.com/gotcha/ipdb -Sphinx==2.2.2 # https://github.com/sphinx-doc/sphinx +Sphinx==2.3.0 # https://github.com/sphinx-doc/sphinx {%- if cookiecutter.use_docker == 'y' %} psycopg2==2.8.3 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 {%- else %} From 2229a09faccd789ca9dbe9d03f3c1031b522a446 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Wed, 18 Dec 2019 08:00:31 -0300 Subject: [PATCH 127/146] Update django from 2.2.8 to 2.2.9 --- {{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 de4e8252..a307b481 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.8 # pyup: < 3.0 # https://www.djangoproject.com/ +django==2.2.9 # pyup: < 3.0 # https://www.djangoproject.com/ django-environ==0.4.5 # https://github.com/joke2k/django-environ django-model-utils==4.0.0 # https://github.com/jazzband/django-model-utils django-allauth==0.40.0 # https://github.com/pennersr/django-allauth From 29d2ff0ccfb33b2bb9a8fc4df24bda409a582b48 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Wed, 18 Dec 2019 08:00:35 -0300 Subject: [PATCH 128/146] Update mypy from 0.750 to 0.760 --- {{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 1b54f001..2d333b5c 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -11,7 +11,7 @@ psycopg2-binary==2.8.4 # https://github.com/psycopg/psycopg2 # Testing # ------------------------------------------------------------------------------ -mypy==0.750 # https://github.com/python/mypy +mypy==0.760 # https://github.com/python/mypy pytest==5.3.1 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.2 # https://github.com/Frozenball/pytest-sugar From 2b0027de71df7d0bae08afc25c5037e6a1896619 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Thu, 19 Dec 2019 08:00:30 -0300 Subject: [PATCH 129/146] Update django-allauth from 0.40.0 to 0.41.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 a307b481..c31481a3 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.9 # pyup: < 3.0 # https://www.djangoproject.com/ django-environ==0.4.5 # https://github.com/joke2k/django-environ django-model-utils==4.0.0 # https://github.com/jazzband/django-model-utils -django-allauth==0.40.0 # https://github.com/pennersr/django-allauth +django-allauth==0.41.0 # https://github.com/pennersr/django-allauth django-crispy-forms==1.8.1 # 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 311b96b169252b1025383712c5413c03da3c91a4 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Fri, 20 Dec 2019 08:00:29 -0300 Subject: [PATCH 130/146] Update pytest_cases from 1.11.9 to 1.12.0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 0a2c0639..2ba89659 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,7 +11,7 @@ flake8==3.7.9 # ------------------------------------------------------------------------------ tox==3.14.2 pytest==5.3.2 -pytest_cases==1.11.9 +pytest_cases==1.12.0 pytest-cookies==0.4.0 pytest-xdist==1.30.0 pyyaml==5.2 From 85efbda0033f6b4d98a0d58634c6047917eaa444 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Fri, 20 Dec 2019 08:00:32 -0300 Subject: [PATCH 131/146] Update pytest-xdist from 1.30.0 to 1.31.0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 0a2c0639..ba7dae86 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,5 +13,5 @@ tox==3.14.2 pytest==5.3.2 pytest_cases==1.11.9 pytest-cookies==0.4.0 -pytest-xdist==1.30.0 +pytest-xdist==1.31.0 pyyaml==5.2 From b75cb6e6da32bb3901a44b8b4561e0a916c95b9d Mon Sep 17 00:00:00 2001 From: browniebroke Date: Fri, 20 Dec 2019 08:00:35 -0300 Subject: [PATCH 132/146] Update mypy from 0.760 to 0.761 --- {{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 2d333b5c..070a0b2d 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -11,7 +11,7 @@ psycopg2-binary==2.8.4 # https://github.com/psycopg/psycopg2 # Testing # ------------------------------------------------------------------------------ -mypy==0.760 # https://github.com/python/mypy +mypy==0.761 # https://github.com/python/mypy pytest==5.3.1 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.2 # https://github.com/Frozenball/pytest-sugar From c7027526a3d295fce9e8b12f5b6e8b1017d789f4 Mon Sep 17 00:00:00 2001 From: David D Date: Sun, 22 Dec 2019 12:52:22 +0100 Subject: [PATCH 133/146] Add Debian 10 (buster) OS dependencies --- .../utility/requirements-buster.apt | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 {{cookiecutter.project_slug}}/utility/requirements-buster.apt diff --git a/{{cookiecutter.project_slug}}/utility/requirements-buster.apt b/{{cookiecutter.project_slug}}/utility/requirements-buster.apt new file mode 100644 index 00000000..75957f40 --- /dev/null +++ b/{{cookiecutter.project_slug}}/utility/requirements-buster.apt @@ -0,0 +1,23 @@ +##basic build dependencies of various Django apps for Debian Jessie 10.x +#build-essential metapackage install: make, gcc, g++, +build-essential +#required to translate +gettext +python3-dev + +##shared dependencies of: +##Pillow, pylibmc +zlib1g-dev + +##Postgresql and psycopg2 dependencies +libpq-dev + +##Pillow dependencies +libtiff5-dev +libjpeg62-turbo-dev +libfreetype6-dev +liblcms2-dev +libwebp-dev + +##django-extensions +libgraphviz-dev From afc7235d577f312de923bc8019d2906d7babb349 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sun, 22 Dec 2019 19:37:15 -0800 Subject: [PATCH 134/146] Update cookiecutter from 1.6.0 to 1.7.0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index eccb2d9d..8f836006 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -cookiecutter==1.6.0 +cookiecutter==1.7.0 sh==1.12.14 binaryornot==0.4.4 From 66991d9e958791f6cbb0946b2e67694286d2b3ab Mon Sep 17 00:00:00 2001 From: browniebroke Date: Mon, 23 Dec 2019 08:00:31 -0300 Subject: [PATCH 135/146] Update sphinx from 2.3.0 to 2.3.1 --- {{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 070a0b2d..89d10373 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -2,7 +2,7 @@ Werkzeug==0.16.0 # https://github.com/pallets/werkzeug ipdb==0.12.3 # https://github.com/gotcha/ipdb -Sphinx==2.3.0 # https://github.com/sphinx-doc/sphinx +Sphinx==2.3.1 # https://github.com/sphinx-doc/sphinx {%- if cookiecutter.use_docker == 'y' %} psycopg2==2.8.3 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 {%- else %} From 028728351acebb1935be021d73ba528e7a5f5250 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Sat, 28 Dec 2019 08:00:31 -0300 Subject: [PATCH 136/146] Update tox from 3.14.2 to 3.14.3 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index eccb2d9d..2ab19a9e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,7 +9,7 @@ flake8==3.7.9 # Testing # ------------------------------------------------------------------------------ -tox==3.14.2 +tox==3.14.3 pytest==5.3.2 pytest_cases==1.12.0 pytest-cookies==0.4.0 From aa48a03c1ff86c06491a8997a2bbb62757cc0281 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Tue, 31 Dec 2019 08:00:30 -0300 Subject: [PATCH 137/146] Update django-compressor from 2.3 to 2.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 c31481a3..7c8c7b2f 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -25,7 +25,7 @@ django-model-utils==4.0.0 # https://github.com/jazzband/django-model-utils django-allauth==0.41.0 # https://github.com/pennersr/django-allauth django-crispy-forms==1.8.1 # 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 +django-compressor==2.4 # https://github.com/django-compressor/django-compressor {%- endif %} django-redis==4.11.0 # https://github.com/niwinz/django-redis From e33e90fb69a056d3f0f490659a9c826a0df42584 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Thu, 2 Jan 2020 08:00:30 -0300 Subject: [PATCH 138/146] Update pillow from 6.2.1 to 7.0.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 c31481a3..2d107178 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -1,6 +1,6 @@ pytz==2019.3 # https://github.com/stub42/pytz python-slugify==4.0.0 # https://github.com/un33k/python-slugify -Pillow==6.2.1 # https://github.com/python-pillow/Pillow +Pillow==7.0.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 41d514e6cfe4563974b6d1d893fa5de5dbb9e6bf Mon Sep 17 00:00:00 2001 From: browniebroke Date: Fri, 3 Jan 2020 08:00:31 -0300 Subject: [PATCH 139/146] Update pre-commit from 1.20.0 to 1.21.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 070a0b2d..8dd68ea4 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -24,7 +24,7 @@ pylint-django==2.0.13 # https://github.com/PyCQA/pylint-django {%- if cookiecutter.use_celery == 'y' %} pylint-celery==0.3 # https://github.com/PyCQA/pylint-celery {%- endif %} -pre-commit==1.20.0 # https://github.com/pre-commit/pre-commit +pre-commit==1.21.0 # https://github.com/pre-commit/pre-commit # Django # ------------------------------------------------------------------------------ From bfe094963582b7b1ccda377709067fb2ca7923c6 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Mon, 6 Jan 2020 11:00:33 +0000 Subject: [PATCH 140/146] Update coverage from 5.0 to 5.0.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 070a0b2d..0acd5ec1 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -18,7 +18,7 @@ pytest-sugar==0.9.2 # https://github.com/Frozenball/pytest-sugar # Code quality # ------------------------------------------------------------------------------ flake8==3.7.9 # https://github.com/PyCQA/flake8 -coverage==5.0 # https://github.com/nedbat/coveragepy +coverage==5.0.2 # https://github.com/nedbat/coveragepy black==19.10b0 # https://github.com/ambv/black pylint-django==2.0.13 # https://github.com/PyCQA/pylint-django {%- if cookiecutter.use_celery == 'y' %} From a0359d9d6a48e1cae6de3a5898e7a9a2258de9b2 Mon Sep 17 00:00:00 2001 From: Hunterx7 Date: Mon, 6 Jan 2020 13:57:19 +0100 Subject: [PATCH 141/146] Bumped runtime for heroku. --- {{cookiecutter.project_slug}}/runtime.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/runtime.txt b/{{cookiecutter.project_slug}}/runtime.txt index 42731f2f..6919bf9e 100644 --- a/{{cookiecutter.project_slug}}/runtime.txt +++ b/{{cookiecutter.project_slug}}/runtime.txt @@ -1 +1 @@ -python-3.7.4 +python-3.7.6 From f0e06a2a17746575825c33ee3535a7cfdbbad08b Mon Sep 17 00:00:00 2001 From: browniebroke Date: Tue, 7 Jan 2020 11:00:32 +0000 Subject: [PATCH 142/146] Update pyyaml from 5.2 to 5.3 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index eccb2d9d..8ecf7328 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,4 +14,4 @@ pytest==5.3.2 pytest_cases==1.12.0 pytest-cookies==0.4.0 pytest-xdist==1.31.0 -pyyaml==5.2 +pyyaml==5.3 From c94c6acfc453489c952e9bce85c27ef543e5bd6e Mon Sep 17 00:00:00 2001 From: browniebroke Date: Wed, 8 Jan 2020 11:00:33 +0000 Subject: [PATCH 143/146] Update sentry-sdk from 0.13.5 to 0.14.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 438ccca6..db3d5e0a 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.3.1 # https://github.com/antonagestam/collectfast {%- endif %} {%- if cookiecutter.use_sentry == "y" %} -sentry-sdk==0.13.5 # https://github.com/getsentry/sentry-python +sentry-sdk==0.14.0 # https://github.com/getsentry/sentry-python {%- endif %} # Django From 3814fc7a3f8a513e0bc46ba6a20ad4ce3b1c31ea Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sat, 11 Jan 2020 13:45:37 +0000 Subject: [PATCH 144/146] Update contributors list --- CONTRIBUTORS.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 53edb28e..71ba3d34 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -122,6 +122,7 @@ Listed in alphabetical order. Henrique G. G. Pereira `@ikkebr`_ Ian Lee `@IanLee1521`_ Irfan Ahmad `@erfaan`_ @erfaan + Isaac12x `@Isaac12x`_ Jan Van Bruggen `@jvanbrug`_ Jelmer Draaijer `@foarsitter`_ Jens Nilsson `@phiberjenz`_ @@ -282,6 +283,7 @@ Listed in alphabetical order. .. _@hjwp: https://github.com/hjwp .. _@IanLee1521: https://github.com/IanLee1521 .. _@ikkebr: https://github.com/ikkebr +.. _@Isaac12x: https://github.com/Isaac12x .. _@iynaix: https://github.com/iynaix .. _@jangeador: https://github.com/jangeador .. _@jazztpt: https://github.com/jazztpt From d9d6eb82c64ea0ba04f9017fd096be6442f11f19 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sat, 11 Jan 2020 13:52:47 +0000 Subject: [PATCH 145/146] Update changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e7d9220..f526bddb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All enhancements and patches to Cookiecutter Django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [2020-01-11] +### Changed +- Speed up & reduce size for production Django image +- Bumped runtime version for Heroku +- Added Debian 10 (Buster) OS dependencies + ## [2019-10-06] ### Changed - Default Python version is now 3.7 (@nicolas471) From 5e1bec2744eef38a909645b85fc1442b7172c59e Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sat, 11 Jan 2020 14:19:11 +0000 Subject: [PATCH 146/146] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f526bddb..58026739 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Speed up & reduce size for production Django image - Bumped runtime version for Heroku - Added Debian 10 (Buster) OS dependencies +- Update Traefik to v2 ## [2019-10-06] ### Changed