From dfd1ee8bb2fd62fdf40fa60aa14821263bd98f94 Mon Sep 17 00:00:00 2001 From: Andrew-Chen-Wang Date: Wed, 29 Apr 2020 16:31:19 -0400 Subject: [PATCH 01/49] Use hiredis --- {{cookiecutter.project_slug}}/config/settings/production.py | 1 + {{cookiecutter.project_slug}}/requirements/base.txt | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index c13f1aebe..6edc4ada3 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -36,6 +36,7 @@ CACHES = { # Mimicing memcache behavior. # http://jazzband.github.io/django-redis/latest/#_memcached_exceptions_behavior "IGNORE_EXCEPTIONS": True, + "PARSER_CLASS": "redis.connection.HiredisParser", }, } } diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index c2d5babf5..1783c8c19 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -8,7 +8,8 @@ argon2-cffi==19.2.0 # https://github.com/hynek/argon2_cffi {%- if cookiecutter.use_whitenoise == 'y' %} whitenoise==5.0.1 # https://github.com/evansd/whitenoise {%- endif %} -redis==3.4.1 # https://github.com/andymccurdy/redis-py +redis==3.4.1 # https://github.com/andymccurdy/redis-py +hiredis==1.0.1 # https://github.com/redis/hiredis-py {%- if cookiecutter.use_celery == "y" %} celery==4.4.2 # pyup: < 5.0 # https://github.com/celery/celery django-celery-beat==2.0.0 # https://github.com/celery/django-celery-beat From 4d54dcaa3218327b851dcbef03d50225dc3a4cf3 Mon Sep 17 00:00:00 2001 From: Andrew-Chen-Wang Date: Wed, 29 Apr 2020 16:42:24 -0400 Subject: [PATCH 02/49] Put hiredis in production only if using Win --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 ++ {{cookiecutter.project_slug}}/requirements/production.txt | 3 +++ 2 files changed, 5 insertions(+) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 1783c8c19..0455e749c 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -9,7 +9,9 @@ argon2-cffi==19.2.0 # https://github.com/hynek/argon2_cffi whitenoise==5.0.1 # https://github.com/evansd/whitenoise {%- endif %} redis==3.4.1 # https://github.com/andymccurdy/redis-py +{%- if cookiecutter.windows == "n" %} hiredis==1.0.1 # https://github.com/redis/hiredis-py +{%- endif %} {%- if cookiecutter.use_celery == "y" %} celery==4.4.2 # pyup: < 5.0 # https://github.com/celery/celery django-celery-beat==2.0.0 # https://github.com/celery/django-celery-beat diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index b45afb66e..51389345b 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -12,6 +12,9 @@ Collectfast==2.1.0 # https://github.com/antonagestam/collectfast {%- if cookiecutter.use_sentry == "y" %} sentry-sdk==0.14.3 # https://github.com/getsentry/sentry-python {%- endif %} +{%- if cookiecutter.windows == "y" %} +hiredis==1.0.1 # https://github.com/redis/hiredis-py +{%- endif %} # Django # ------------------------------------------------------------------------------ From bf5f557d2b1f3e9ff784e2aae3b357a34df3e722 Mon Sep 17 00:00:00 2001 From: Andrew-Chen-Wang Date: Fri, 1 May 2020 10:35:20 -0400 Subject: [PATCH 03/49] Added docker parameter to hiredis requirement --- {{cookiecutter.project_slug}}/config/settings/production.py | 1 - {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index 6edc4ada3..c13f1aebe 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -36,7 +36,6 @@ CACHES = { # Mimicing memcache behavior. # http://jazzband.github.io/django-redis/latest/#_memcached_exceptions_behavior "IGNORE_EXCEPTIONS": True, - "PARSER_CLASS": "redis.connection.HiredisParser", }, } } diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 0455e749c..7fa0aeca7 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -9,7 +9,7 @@ argon2-cffi==19.2.0 # https://github.com/hynek/argon2_cffi whitenoise==5.0.1 # https://github.com/evansd/whitenoise {%- endif %} redis==3.4.1 # https://github.com/andymccurdy/redis-py -{%- if cookiecutter.windows == "n" %} +{%- if cookiecutter.use_docker == "y" or cookiecutter.windows == "n" %} hiredis==1.0.1 # https://github.com/redis/hiredis-py {%- endif %} {%- if cookiecutter.use_celery == "y" %} diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 51389345b..4f0e6119d 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -12,7 +12,7 @@ Collectfast==2.1.0 # https://github.com/antonagestam/collectfast {%- if cookiecutter.use_sentry == "y" %} sentry-sdk==0.14.3 # https://github.com/getsentry/sentry-python {%- endif %} -{%- if cookiecutter.windows == "y" %} +{%- if cookiecutter.use_docker == "y" or cookiecutter.windows == "y" %} hiredis==1.0.1 # https://github.com/redis/hiredis-py {%- endif %} From b70b6ebd7e99e8bba88fddd29653f501c513ea2b Mon Sep 17 00:00:00 2001 From: Andrew-Chen-Wang Date: Fri, 1 May 2020 10:39:30 -0400 Subject: [PATCH 04/49] Fixed production.txt typo when docker and windows combine --- {{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 4f0e6119d..c5ba356c4 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -12,7 +12,7 @@ Collectfast==2.1.0 # https://github.com/antonagestam/collectfast {%- if cookiecutter.use_sentry == "y" %} sentry-sdk==0.14.3 # https://github.com/getsentry/sentry-python {%- endif %} -{%- if cookiecutter.use_docker == "y" or cookiecutter.windows == "y" %} +{%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %} hiredis==1.0.1 # https://github.com/redis/hiredis-py {%- endif %} From bcfcd384f823a7363c47988444342f95bcc895c9 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Tue, 17 Mar 2020 18:58:11 +0000 Subject: [PATCH 05/49] Test user detail view --- .../users/tests/test_views.py | 35 ++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_views.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_views.py index ca0060595..82abecb51 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_views.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_views.py @@ -1,8 +1,15 @@ import pytest +from django.contrib.auth.models import AnonymousUser +from django.http.response import Http404 from django.test import RequestFactory from {{ cookiecutter.project_slug }}.users.models import User -from {{ cookiecutter.project_slug }}.users.views import UserRedirectView, UserUpdateView +from {{ cookiecutter.project_slug }}.users.tests.factories import UserFactory +from {{ cookiecutter.project_slug }}.users.views import ( + UserRedirectView, + UserUpdateView, + user_detail_view, +) pytestmark = pytest.mark.django_db @@ -44,3 +51,29 @@ class TestUserRedirectView: view.request = request assert view.get_redirect_url() == f"/users/{user.username}/" + + +class TestUserDetailView: + def test_authenticated(self, user: User, rf: RequestFactory): + request = rf.get("/fake-url/") + request.user = UserFactory() + + response = user_detail_view(request, username=user.username) + + assert response.status_code == 200 + + def test_not_authenticated(self, user: User, rf: RequestFactory): + request = rf.get("/fake-url/") + request.user = AnonymousUser() # type: ignore + + response = user_detail_view(request, username=user.username) + + assert response.status_code == 302 + assert response.url == f"/accounts/login/?next=/fake-url/" + + def test_case_sensitivity(self, rf: RequestFactory): + request = rf.get("/fake-url/") + request.user = UserFactory(username="UserName") + + with pytest.raises(Http404): + user_detail_view(request, username="username") From 05a5bbbad73cf37ba7527e2efd6283697a733145 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Fri, 1 May 2020 17:57:43 +0100 Subject: [PATCH 06/49] Use default distribution on Travis --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9abf37a18..6039075a0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,3 @@ -dist: xenial - services: - docker From e37627c4b1d74deed8a422098d3a3c0de9de8c8a Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Fri, 1 May 2020 19:10:42 +0100 Subject: [PATCH 07/49] Fix pre-commit config & add Black to the pre-commmit hooks Fixes #2502 --- .../.pre-commit-config.yaml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index c50fefe94..60f46363b 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -3,18 +3,22 @@ default_stages: [commit] fail_fast: true repos: -- repo: https://github.com/pre-commit/pre-commit-hooks + - repo: https://github.com/pre-commit/pre-commit-hooks rev: master hooks: - id: trailing-whitespace - files: (^|/).+\.(py|html|sh|css|js)$ + - id: end-of-file-fixer + - id: check-yaml -- repo: local + - repo: https://github.com/psf/black + rev: 19.10b0 + hooks: + - id: black + + - repo: https://gitlab.com/pycqa/flake8 + rev: 3.7.9 hooks: - id: flake8 - name: flake8 - entry: flake8 - language: python - types: [python] args: ['--config=setup.cfg'] + additional_dependencies: [flake8-isort] From 3f0ff8aae9b15b38d2480e7f3ac43b0ed0380797 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sat, 2 May 2020 22:30:22 -0700 Subject: [PATCH 08/49] Update tox from 3.14.6 to 3.15.0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 18439a352..a4465791b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,7 @@ flake8-isort==3.0.0 # Testing # ------------------------------------------------------------------------------ -tox==3.14.6 +tox==3.15.0 pytest==5.4.1 pytest-cookies==0.5.1 pytest-instafail==0.4.1.post0 From 79f6fdbee32549fd77168769c374ffdc0ff5edc0 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sat, 9 May 2020 00:17:29 -0700 Subject: [PATCH 09/49] Update pytest from 5.4.1 to 5.4.2 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index a4465791b..12f3d898c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,7 +11,7 @@ flake8-isort==3.0.0 # Testing # ------------------------------------------------------------------------------ tox==3.15.0 -pytest==5.4.1 +pytest==5.4.2 pytest-cookies==0.5.1 pytest-instafail==0.4.1.post0 pyyaml==5.3.1 From 580ef4117d148f678acb294b29503c3edca4a307 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sat, 9 May 2020 00:17:30 -0700 Subject: [PATCH 10/49] Update pytest from 5.4.1 to 5.4.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 9860c74b2..79c5523d1 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -16,7 +16,7 @@ watchgod==0.6 # https://github.com/samuelcolvin/watchgod # ------------------------------------------------------------------------------ mypy==0.770 # https://github.com/python/mypy django-stubs==1.5.0 # https://github.com/typeddjango/django-stubs -pytest==5.4.1 # https://github.com/pytest-dev/pytest +pytest==5.4.2 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.3 # https://github.com/Frozenball/pytest-sugar # Code quality From a5cb77399ef3e609739494301f25a77a27c98fa3 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 11 May 2020 14:13:47 -0700 Subject: [PATCH 11/49] Update pre-commit from 2.3.0 to 2.4.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 79c5523d1..91cde6091 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -29,7 +29,7 @@ pylint-django==2.0.15 # https://github.com/PyCQA/pylint-django {%- if cookiecutter.use_celery == 'y' %} pylint-celery==0.3 # https://github.com/PyCQA/pylint-celery {%- endif %} -pre-commit==2.3.0 # https://github.com/pre-commit/pre-commit +pre-commit==2.4.0 # https://github.com/pre-commit/pre-commit # Django # ------------------------------------------------------------------------------ From 7b1365c564639f9983e91f5f5a752fb5db18d15c Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Tue, 12 May 2020 01:06:19 -0700 Subject: [PATCH 12/49] Update flake8 from 3.7.9 to 3.8.1 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 12f3d898c..e109518e6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ binaryornot==0.4.4 # Code quality # ------------------------------------------------------------------------------ black==19.10b0 -flake8==3.7.9 +flake8==3.8.1 flake8-isort==3.0.0 # Testing From b1c6ad25d21c9969c665a5a76cd47c2a24e40cb2 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Tue, 12 May 2020 01:06:20 -0700 Subject: [PATCH 13/49] Update flake8 from 3.7.9 to 3.8.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 79c5523d1..d4e065ff8 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -21,7 +21,7 @@ pytest-sugar==0.9.3 # https://github.com/Frozenball/pytest-sugar # Code quality # ------------------------------------------------------------------------------ -flake8==3.7.9 # https://github.com/PyCQA/flake8 +flake8==3.8.1 # https://github.com/PyCQA/flake8 flake8-isort==3.0.0 # https://github.com/gforcada/flake8-isort coverage==5.1 # https://github.com/nedbat/coveragepy black==19.10b0 # https://github.com/ambv/black From cd740c26194d4418026dcc05fb56e2c6ccb0711b Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Tue, 12 May 2020 10:12:48 +0100 Subject: [PATCH 14/49] Update flake8 from 3.7.9 to 3.8.1 in pre-commit config --- {{cookiecutter.project_slug}}/.pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index 60f46363b..71524052d 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -16,7 +16,7 @@ repos: - id: black - repo: https://gitlab.com/pycqa/flake8 - rev: 3.7.9 + rev: 3.8.1 hooks: - id: flake8 args: ['--config=setup.cfg'] From 81642420c4da18fabd6cc8e9c5e3365a57e6afba Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Tue, 12 May 2020 10:14:34 +0100 Subject: [PATCH 15/49] Run flake8 from the generated project root 3.8.1 can't find the config if running from elsewhere: https://gitlab.com/pycqa/flake8/-/issues/639 --- tests/test_cookiecutter_generation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py index 51500705b..664158b5a 100755 --- a/tests/test_cookiecutter_generation.py +++ b/tests/test_cookiecutter_generation.py @@ -156,7 +156,7 @@ def test_flake8_passes(cookies, context_override): result = cookies.bake(extra_context=context_override) try: - sh.flake8(str(result.project)) + sh.flake8(_cwd=str(result.project)) except sh.ErrorReturnCode as e: pytest.fail(e.stdout.decode()) @@ -167,7 +167,7 @@ def test_black_passes(cookies, context_override): result = cookies.bake(extra_context=context_override) try: - sh.black("--check", "--diff", "--exclude", "migrations", f"{result.project}/") + sh.black("--check", "--diff", "--exclude", "migrations", _cwd=str(result.project)) except sh.ErrorReturnCode as e: pytest.fail(e.stdout.decode()) From 09790ee8fb73d56662c1367f53132e08452d6614 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Tue, 12 May 2020 10:18:15 +0100 Subject: [PATCH 16/49] Resolve new flake8 error --- .../{{cookiecutter.project_slug}}/users/tests/test_views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_views.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_views.py index 82abecb51..18b8da7a6 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_views.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_views.py @@ -69,7 +69,7 @@ class TestUserDetailView: response = user_detail_view(request, username=user.username) assert response.status_code == 302 - assert response.url == f"/accounts/login/?next=/fake-url/" + assert response.url == "/accounts/login/?next=/fake-url/" def test_case_sensitivity(self, rf: RequestFactory): request = rf.get("/fake-url/") From 6f88fe6b4fa8b173ab63115387cdd7b1fa516127 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Tue, 12 May 2020 10:24:25 +0100 Subject: [PATCH 17/49] Reformat test file --- tests/test_cookiecutter_generation.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py index 664158b5a..aa7cc75a4 100755 --- a/tests/test_cookiecutter_generation.py +++ b/tests/test_cookiecutter_generation.py @@ -167,7 +167,9 @@ def test_black_passes(cookies, context_override): result = cookies.bake(extra_context=context_override) try: - sh.black("--check", "--diff", "--exclude", "migrations", _cwd=str(result.project)) + sh.black( + "--check", "--diff", "--exclude", "migrations", _cwd=str(result.project) + ) except sh.ErrorReturnCode as e: pytest.fail(e.stdout.decode()) From 309376ee4491134b0706cedc4ca567aa20f7229e Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Tue, 12 May 2020 19:50:12 +0100 Subject: [PATCH 18/49] Remove manual requirements Issue with PyUP seems fixed --- .pyup.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.pyup.yml b/.pyup.yml index c503dabf3..bffaa06c9 100644 --- a/.pyup.yml +++ b/.pyup.yml @@ -12,11 +12,3 @@ pin: True # requires private repo permissions, even on public repos # default: empty label_prs: update - -# Specify requirement files by hand, pyup seems to struggle to -# find the ones in the project_slug folder -requirements: - - "requirements.txt" - - "{{cookiecutter.project_slug}}/requirements/base.txt" - - "{{cookiecutter.project_slug}}/requirements/local.txt" - - "{{cookiecutter.project_slug}}/requirements/production.txt" From ce66080f857ef9e19067c30898d88e85940a3ce1 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 13 May 2020 12:42:53 -0700 Subject: [PATCH 19/49] Update sentry-sdk from 0.14.3 to 0.14.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 edf9a590c..2b8ac9f81 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -8,7 +8,7 @@ psycopg2==2.8.5 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 Collectfast==2.1.0 # https://github.com/antonagestam/collectfast {%- endif %} {%- if cookiecutter.use_sentry == "y" %} -sentry-sdk==0.14.3 # https://github.com/getsentry/sentry-python +sentry-sdk==0.14.4 # https://github.com/getsentry/sentry-python {%- endif %} {%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %} hiredis==1.0.1 # https://github.com/redis/hiredis-py From 70f6471c751b2eab63b3f343c87ebb60b0b3d0ca Mon Sep 17 00:00:00 2001 From: Tano Abeleyra Date: Sun, 17 May 2020 12:37:35 -0300 Subject: [PATCH 20/49] Allow to use a CDN with S3 --- .../config/settings/production.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index c13f1aebe..3d4f324cd 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -90,6 +90,9 @@ AWS_S3_OBJECT_PARAMETERS = { 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) +# https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#cloudfront +AWS_S3_CUSTOM_DOMAIN = env("DJANGO_AWS_S3_CUSTOM_DOMAIN", default=None) +aws_s3_domain = AWS_S3_CUSTOM_DOMAIN or f"{AWS_STORAGE_BUCKET_NAME}.s3.amazonaws.com" {% elif cookiecutter.cloud_provider == 'GCP' %} GS_BUCKET_NAME = env("DJANGO_GCP_STORAGE_BUCKET_NAME") GS_DEFAULT_ACL = "publicRead" @@ -104,7 +107,7 @@ STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage" {% elif cookiecutter.cloud_provider == 'AWS' -%} STATICFILES_STORAGE = "{{cookiecutter.project_slug}}.utils.storages.StaticRootS3Boto3Storage" COLLECTFAST_STRATEGY = "collectfast.strategies.boto3.Boto3Strategy" -STATIC_URL = f"https://{AWS_STORAGE_BUCKET_NAME}.s3.amazonaws.com/static/" +STATIC_URL = f"https://{aws_s3_domain}/static/" {% elif cookiecutter.cloud_provider == 'GCP' -%} STATICFILES_STORAGE = "{{cookiecutter.project_slug}}.utils.storages.StaticRootGoogleCloudStorage" COLLECTFAST_STRATEGY = "collectfast.strategies.gcloud.GoogleCloudStrategy" @@ -115,7 +118,7 @@ STATIC_URL = f"https://storage.googleapis.com/{GS_BUCKET_NAME}/static/" # ------------------------------------------------------------------------------ {%- if cookiecutter.cloud_provider == 'AWS' %} DEFAULT_FILE_STORAGE = "{{cookiecutter.project_slug}}.utils.storages.MediaRootS3Boto3Storage" -MEDIA_URL = f"https://{AWS_STORAGE_BUCKET_NAME}.s3.amazonaws.com/media/" +MEDIA_URL = f"https://{aws_s3_domain}/media/" {%- elif cookiecutter.cloud_provider == 'GCP' %} DEFAULT_FILE_STORAGE = "{{cookiecutter.project_slug}}.utils.storages.MediaRootGoogleCloudStorage" MEDIA_URL = f"https://storage.googleapis.com/{GS_BUCKET_NAME}/media/" From 15fa899bb442da2298cdb67514da78803d2d54c6 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 20 May 2020 19:23:53 -0700 Subject: [PATCH 21/49] Update tox from 3.15.0 to 3.15.1 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index e109518e6..02548be79 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,7 @@ flake8-isort==3.0.0 # Testing # ------------------------------------------------------------------------------ -tox==3.15.0 +tox==3.15.1 pytest==5.4.2 pytest-cookies==0.5.1 pytest-instafail==0.4.1.post0 From a8672e08cb8e0a8942c18fed0ae331a77e879c03 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sun, 24 May 2020 03:02:08 +0200 Subject: [PATCH 22/49] Update flake8 to 3.8.2 (#2607) --- requirements.txt | 2 +- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 02548be79..067ad6c6e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ binaryornot==0.4.4 # Code quality # ------------------------------------------------------------------------------ black==19.10b0 -flake8==3.8.1 +flake8==3.8.2 flake8-isort==3.0.0 # Testing diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 6f7fa2de1..78a1f6c37 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -21,7 +21,7 @@ pytest-sugar==0.9.3 # https://github.com/Frozenball/pytest-sugar # Code quality # ------------------------------------------------------------------------------ -flake8==3.8.1 # https://github.com/PyCQA/flake8 +flake8==3.8.2 # https://github.com/PyCQA/flake8 flake8-isort==3.0.0 # https://github.com/gforcada/flake8-isort coverage==5.1 # https://github.com/nedbat/coveragepy black==19.10b0 # https://github.com/ambv/black From 090c62e862f61083d0cf397bf7666773ecdfd273 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 27 May 2020 02:27:13 -0700 Subject: [PATCH 23/49] Update sphinx from 3.0.3 to 3.0.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 78a1f6c37..d38a70bc5 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -2,7 +2,7 @@ Werkzeug==1.0.1 # https://github.com/pallets/werkzeug ipdb==0.13.2 # https://github.com/gotcha/ipdb -Sphinx==3.0.3 # https://github.com/sphinx-doc/sphinx +Sphinx==3.0.4 # https://github.com/sphinx-doc/sphinx {%- if cookiecutter.use_docker == 'y' %} psycopg2==2.8.5 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 {%- else %} From 009ca15a4c797c53dfeeff40a6620c5732a59ee3 Mon Sep 17 00:00:00 2001 From: Tano Abeleyra Date: Thu, 28 May 2020 19:16:54 -0300 Subject: [PATCH 24/49] Add AWS_S3_CUSTOM_DOMAIN entry to settings.rst --- docs/settings.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/settings.rst b/docs/settings.rst index 2ae8814e9..949d5f35f 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -45,6 +45,7 @@ DJANGO_AWS_ACCESS_KEY_ID AWS_ACCESS_KEY_ID n/a DJANGO_AWS_SECRET_ACCESS_KEY AWS_SECRET_ACCESS_KEY n/a raises error DJANGO_AWS_STORAGE_BUCKET_NAME AWS_STORAGE_BUCKET_NAME n/a raises error DJANGO_AWS_S3_REGION_NAME AWS_S3_REGION_NAME n/a None +DJANGO_AWS_S3_CUSTOM_DOMAIN AWS_S3_CUSTOM_DOMAIN n/a None DJANGO_GCP_STORAGE_BUCKET_NAME GS_BUCKET_NAME n/a raises error GOOGLE_APPLICATION_CREDENTIALS n/a n/a raises error SENTRY_DSN SENTRY_DSN n/a raises error From 7c3558fa624d3069007df3e1071bcbd93be6d6c9 Mon Sep 17 00:00:00 2001 From: Andrew Chen Wang <60190294+Andrew-Chen-Wang@users.noreply.github.com> Date: Fri, 29 May 2020 17:23:15 -0400 Subject: [PATCH 25/49] Fix Docker configuration for Gitlab CI #2549 * Just missing the services I believe according to @rocode? * I'm hoping to just completely eradicate the need for this setup with a follow-up PR for completely non-Docker approach on CI that supports celery, too. --- {{cookiecutter.project_slug}}/.gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/{{cookiecutter.project_slug}}/.gitlab-ci.yml b/{{cookiecutter.project_slug}}/.gitlab-ci.yml index a74d5de87..f7c4f24a4 100644 --- a/{{cookiecutter.project_slug}}/.gitlab-ci.yml +++ b/{{cookiecutter.project_slug}}/.gitlab-ci.yml @@ -23,6 +23,7 @@ pytest: stage: test image: python:3.7 {% if cookiecutter.use_docker == 'y' -%} + image: docker/compose:latest tags: - docker services: From d7f22a1158839d27ff898ae66f8edf39ac1943a6 Mon Sep 17 00:00:00 2001 From: Andrew Chen Wang <60190294+Andrew-Chen-Wang@users.noreply.github.com> Date: Fri, 29 May 2020 18:05:44 -0400 Subject: [PATCH 26/49] Changed service to Docker dind --- {{cookiecutter.project_slug}}/.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/.gitlab-ci.yml b/{{cookiecutter.project_slug}}/.gitlab-ci.yml index f7c4f24a4..246c4c982 100644 --- a/{{cookiecutter.project_slug}}/.gitlab-ci.yml +++ b/{{cookiecutter.project_slug}}/.gitlab-ci.yml @@ -27,7 +27,7 @@ pytest: tags: - docker services: - - docker + - docker:dind before_script: - docker-compose -f local.yml build # Ensure celerybeat does not crash due to non-existent tables From 433d30ec1437e282541912e111f68e92e51ea2d0 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 3 Jun 2020 00:26:12 -0700 Subject: [PATCH 27/49] Update pytest from 5.4.2 to 5.4.3 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 067ad6c6e..80882d4c1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,7 +11,7 @@ flake8-isort==3.0.0 # Testing # ------------------------------------------------------------------------------ tox==3.15.1 -pytest==5.4.2 +pytest==5.4.3 pytest-cookies==0.5.1 pytest-instafail==0.4.1.post0 pyyaml==5.3.1 From 9e87d4b189fb9b7c414a7113ecf02612962f6d73 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 3 Jun 2020 00:26:13 -0700 Subject: [PATCH 28/49] Update pytest from 5.4.2 to 5.4.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 d38a70bc5..b5d9a250e 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -16,7 +16,7 @@ watchgod==0.6 # https://github.com/samuelcolvin/watchgod # ------------------------------------------------------------------------------ mypy==0.770 # https://github.com/python/mypy django-stubs==1.5.0 # https://github.com/typeddjango/django-stubs -pytest==5.4.2 # https://github.com/pytest-dev/pytest +pytest==5.4.3 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.3 # https://github.com/Frozenball/pytest-sugar # Code quality From 9d0b570c51986ea9586240c24c2ceaf52feec25a Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 3 Jun 2020 05:12:36 -0700 Subject: [PATCH 29/49] Update mypy from 0.770 to 0.780 --- {{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 d38a70bc5..3c30b1547 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -14,7 +14,7 @@ watchgod==0.6 # https://github.com/samuelcolvin/watchgod # Testing # ------------------------------------------------------------------------------ -mypy==0.770 # https://github.com/python/mypy +mypy==0.780 # https://github.com/python/mypy django-stubs==1.5.0 # https://github.com/typeddjango/django-stubs pytest==5.4.2 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.3 # https://github.com/Frozenball/pytest-sugar From 24e8a17d74a47e57dfc05a754be76a566ef504df Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Fri, 5 Jun 2020 17:08:27 -0700 Subject: [PATCH 30/49] Update collectfast from 2.1.0 to 2.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 2b8ac9f81..a614bdbe9 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -5,7 +5,7 @@ gunicorn==20.0.4 # https://github.com/benoitc/gunicorn psycopg2==2.8.5 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 {%- if cookiecutter.use_whitenoise == 'n' %} -Collectfast==2.1.0 # https://github.com/antonagestam/collectfast +Collectfast==2.2.0 # https://github.com/antonagestam/collectfast {%- endif %} {%- if cookiecutter.use_sentry == "y" %} sentry-sdk==0.14.4 # https://github.com/getsentry/sentry-python From 52c4f57ecab2c10c0f5f4039b088d946df85295a Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sun, 7 Jun 2020 14:24:38 -0700 Subject: [PATCH 31/49] Update tox from 3.15.1 to 3.15.2 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 80882d4c1..d05ed6a4a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,7 @@ flake8-isort==3.0.0 # Testing # ------------------------------------------------------------------------------ -tox==3.15.1 +tox==3.15.2 pytest==5.4.3 pytest-cookies==0.5.1 pytest-instafail==0.4.1.post0 From afe02f2fd19aa1df15309aaf9641d38b8783f270 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 8 Jun 2020 17:02:41 -0700 Subject: [PATCH 32/49] Update flake8 from 3.8.2 to 3.8.3 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 80882d4c1..4044d3048 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ binaryornot==0.4.4 # Code quality # ------------------------------------------------------------------------------ black==19.10b0 -flake8==3.8.2 +flake8==3.8.3 flake8-isort==3.0.0 # Testing From 6038a654abdecbaf091298bdf69e628e23132b9b Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 8 Jun 2020 17:02:43 -0700 Subject: [PATCH 33/49] Update flake8 from 3.8.2 to 3.8.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 b5d9a250e..e02bb4566 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -21,7 +21,7 @@ pytest-sugar==0.9.3 # https://github.com/Frozenball/pytest-sugar # Code quality # ------------------------------------------------------------------------------ -flake8==3.8.2 # https://github.com/PyCQA/flake8 +flake8==3.8.3 # https://github.com/PyCQA/flake8 flake8-isort==3.0.0 # https://github.com/gforcada/flake8-isort coverage==5.1 # https://github.com/nedbat/coveragepy black==19.10b0 # https://github.com/ambv/black From 54f8e3d672671434dd68629e96ace6108f6fbd7a Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Tue, 9 Jun 2020 16:02:00 -0700 Subject: [PATCH 34/49] Update pre-commit from 2.4.0 to 2.5.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 b5d9a250e..4986bdaf4 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -29,7 +29,7 @@ pylint-django==2.0.15 # https://github.com/PyCQA/pylint-django {%- if cookiecutter.use_celery == 'y' %} pylint-celery==0.3 # https://github.com/PyCQA/pylint-celery {%- endif %} -pre-commit==2.4.0 # https://github.com/pre-commit/pre-commit +pre-commit==2.5.1 # https://github.com/pre-commit/pre-commit # Django # ------------------------------------------------------------------------------ From b7c75bccf51b19a4fd8f156f104e0f36619e8235 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sun, 14 Jun 2020 03:12:50 -0700 Subject: [PATCH 35/49] Update pytest-instafail from 0.4.1.post0 to 0.4.2 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 80882d4c1..e7fbe1d5e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,5 +13,5 @@ flake8-isort==3.0.0 tox==3.15.1 pytest==5.4.3 pytest-cookies==0.5.1 -pytest-instafail==0.4.1.post0 +pytest-instafail==0.4.2 pyyaml==5.3.1 From 1b6e4994ca45ef38551a4cf2573c9241e821dce6 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sun, 14 Jun 2020 03:13:04 -0700 Subject: [PATCH 36/49] Update sphinx from 3.0.4 to 3.1.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 b5d9a250e..e661835d2 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -2,7 +2,7 @@ Werkzeug==1.0.1 # https://github.com/pallets/werkzeug ipdb==0.13.2 # https://github.com/gotcha/ipdb -Sphinx==3.0.4 # https://github.com/sphinx-doc/sphinx +Sphinx==3.1.1 # https://github.com/sphinx-doc/sphinx {%- if cookiecutter.use_docker == 'y' %} psycopg2==2.8.5 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 {%- else %} From 89b81452a9201fbed87598e2567ba8d629e97f2a Mon Sep 17 00:00:00 2001 From: Andrew Chen Wang <60190294+Andrew-Chen-Wang@users.noreply.github.com> Date: Tue, 16 Jun 2020 20:21:51 -0400 Subject: [PATCH 37/49] Update Django to 3.0.7 due to CVEs There were several CVE's that arose between 3.0.3 to 3.0.7. Updating quickly will resolve the vulnerabilities and fix several PRs. --- {{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 4f2ebe490..e1c7d9ef4 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -25,7 +25,7 @@ uvicorn==0.11.5 # https://github.com/encode/uvicorn # Django # ------------------------------------------------------------------------------ -django==3.0.5 # pyup: < 3.1 # https://www.djangoproject.com/ +django==3.0.7 # pyup: < 3.1 # 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.41.0 # https://github.com/pennersr/django-allauth From 8bdef165a893cff627a6876be887756ee13be6c7 Mon Sep 17 00:00:00 2001 From: Andrew Chen Wang <60190294+Andrew-Chen-Wang@users.noreply.github.com> Date: Tue, 16 Jun 2020 23:51:21 -0400 Subject: [PATCH 38/49] Fixed local async command in docs --- docs/developing-locally.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developing-locally.rst b/docs/developing-locally.rst index dc146c232..a5d598f0b 100644 --- a/docs/developing-locally.rst +++ b/docs/developing-locally.rst @@ -80,7 +80,7 @@ First things first. or if you're running asynchronously: :: - $ gunicorn config.asgi --bind 0.0.0.0:8000 -k uvicorn.workers.UvicornWorker --reload + $ uvicorn config.asgi:application --host 0.0.0.0 --reload .. _PostgreSQL: https://www.postgresql.org/download/ .. _Redis: https://redis.io/download From 4b103d1d93ab6dabf93813d270656da33d128699 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Wed, 17 Jun 2020 23:15:32 +0100 Subject: [PATCH 39/49] Update .pyup.yml --- .pyup.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.pyup.yml b/.pyup.yml index bffaa06c9..4082eed86 100644 --- a/.pyup.yml +++ b/.pyup.yml @@ -12,3 +12,9 @@ pin: True # requires private repo permissions, even on public repos # default: empty label_prs: update + +requirements: + - requirements.txt + - {{cookiecutter.project_slug}}/requirements/base.txt + - {{cookiecutter.project_slug}}/requirements/local.txt + - {{cookiecutter.project_slug}}/requirements/production.txt From d2e9e8ee3f24fd6c6064ebdac8415b4ae9474ab1 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Wed, 17 Jun 2020 23:16:13 +0100 Subject: [PATCH 40/49] Update .pyup.yml --- .pyup.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pyup.yml b/.pyup.yml index 4082eed86..b330b22bb 100644 --- a/.pyup.yml +++ b/.pyup.yml @@ -14,7 +14,7 @@ pin: True label_prs: update requirements: - - requirements.txt - - {{cookiecutter.project_slug}}/requirements/base.txt - - {{cookiecutter.project_slug}}/requirements/local.txt - - {{cookiecutter.project_slug}}/requirements/production.txt + - "requirements.txt" + - "{{cookiecutter.project_slug}}/requirements/base.txt" + - "{{cookiecutter.project_slug}}/requirements/local.txt" + - "{{cookiecutter.project_slug}}/requirements/production.txt" From d3a000d76d233debb975e570f5093a2cb4e9bdb0 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Thu, 18 Jun 2020 04:45:15 -0700 Subject: [PATCH 41/49] Update sentry-sdk from 0.14.4 to 0.15.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 2b8ac9f81..eda39264e 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -8,7 +8,7 @@ psycopg2==2.8.5 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 Collectfast==2.1.0 # https://github.com/antonagestam/collectfast {%- endif %} {%- if cookiecutter.use_sentry == "y" %} -sentry-sdk==0.14.4 # https://github.com/getsentry/sentry-python +sentry-sdk==0.15.1 # https://github.com/getsentry/sentry-python {%- endif %} {%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %} hiredis==1.0.1 # https://github.com/redis/hiredis-py From d979c342d655a537b9f131c9cf0ae8a9ed0f30cf Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sat, 20 Jun 2020 08:51:49 -0700 Subject: [PATCH 42/49] Update mypy from 0.780 to 0.781 --- {{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 fdd9fd44e..9e2be82bf 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -14,7 +14,7 @@ watchgod==0.6 # https://github.com/samuelcolvin/watchgod # Testing # ------------------------------------------------------------------------------ -mypy==0.780 # https://github.com/python/mypy +mypy==0.781 # https://github.com/python/mypy django-stubs==1.5.0 # https://github.com/typeddjango/django-stubs pytest==5.4.3 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.3 # https://github.com/Frozenball/pytest-sugar From 88f9a6c289ccb9e30ff991fd5788b7b215763a20 Mon Sep 17 00:00:00 2001 From: Gil Date: Sun, 21 Jun 2020 16:13:42 +0900 Subject: [PATCH 43/49] Replace User by get_user_model --- .../{{cookiecutter.project_slug}}/users/api/serializers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/api/serializers.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/api/serializers.py index 04bf4c85e..8bd39d30e 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/api/serializers.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/api/serializers.py @@ -1,6 +1,7 @@ +from django.contrib.auth import get_user_model from rest_framework import serializers -from {{ cookiecutter.project_slug }}.users.models import User +User = get_user_model() class UserSerializer(serializers.ModelSerializer): From 3961ab8dd83e2b5bd71bccee00212a731e4babfd Mon Sep 17 00:00:00 2001 From: Gil Date: Sun, 21 Jun 2020 16:17:26 +0900 Subject: [PATCH 44/49] Add AsheKR in CONTRIBUTORS.rst --- CONTRIBUTORS.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 5962af75d..c1813e837 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -65,6 +65,7 @@ Listed in alphabetical order. Anuj Bansal `@ahhda`_ Arcuri Davide `@dadokkio`_ Areski Belaid `@areski`_ + AsheKR `@ashekr`_ Ashley Camba Barclay Gauld `@yunti`_ Bartek `@btknu`_ From f4aee2bc68af593bd4239ae0272899efadb0f5f5 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sun, 21 Jun 2020 14:15:00 +0100 Subject: [PATCH 45/49] Fix broken link --- CONTRIBUTORS.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index c1813e837..32ba496e8 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -252,6 +252,7 @@ Listed in alphabetical order. .. _@archinal: https://github.com/archinal .. _@areski: https://github.com/areski .. _@arruda: https://github.com/arruda +.. _@ashekr: https://github.com/ashekr .. _@bertdemiranda: https://github.com/bertdemiranda .. _@bittner: https://github.com/bittner .. _@blaxpy: https://github.com/blaxpy From 793151162770d8a4538627af6638253af7d95e98 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sun, 21 Jun 2020 14:20:29 +0100 Subject: [PATCH 46/49] Bump version to 3.0.7 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 6dfd9e50b..6b80bd9a0 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ except ImportError: # Our version ALWAYS matches the version of Django we support # If Django has a new release, we branch, tag, then update this setting after the tag. -version = "3.0.5-01" +version = "3.0.7" if sys.argv[-1] == "tag": os.system(f'git tag -a {version} -m "version {version}"') From fe8a939611f123ece8a36410d5ae3c1f4b6822da Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sun, 21 Jun 2020 14:23:48 +0100 Subject: [PATCH 47/49] Bump flake8 in pre-commit config --- {{cookiecutter.project_slug}}/.pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index 71524052d..6aa9207a9 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -16,7 +16,7 @@ repos: - id: black - repo: https://gitlab.com/pycqa/flake8 - rev: 3.8.1 + rev: 3.8.3 hooks: - id: flake8 args: ['--config=setup.cfg'] From aadf66185cadaf5c5388b6e7ab9754379b1aad48 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sun, 21 Jun 2020 14:26:40 +0100 Subject: [PATCH 48/49] Update base requirements to latest version --- {{cookiecutter.project_slug}}/requirements/base.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index e1c7d9ef4..4baf2f376 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -4,16 +4,16 @@ Pillow==7.1.2 # 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.2.0 # https://github.com/hynek/argon2_cffi +argon2-cffi==20.1.0 # https://github.com/hynek/argon2_cffi {%- if cookiecutter.use_whitenoise == 'y' %} -whitenoise==5.0.1 # https://github.com/evansd/whitenoise +whitenoise==5.1.0 # https://github.com/evansd/whitenoise {%- endif %} redis==3.5.0 # https://github.com/andymccurdy/redis-py {%- if cookiecutter.use_docker == "y" or cookiecutter.windows == "n" %} hiredis==1.0.1 # https://github.com/redis/hiredis-py {%- endif %} {%- if cookiecutter.use_celery == "y" %} -celery==4.4.2 # pyup: < 5.0 # https://github.com/celery/celery +celery==4.4.5 # pyup: < 5.0 # https://github.com/celery/celery django-celery-beat==2.0.0 # https://github.com/celery/django-celery-beat {%- if cookiecutter.use_docker == 'y' %} flower==0.9.4 # https://github.com/mher/flower @@ -28,12 +28,12 @@ uvicorn==0.11.5 # https://github.com/encode/uvicorn django==3.0.7 # pyup: < 3.1 # 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.41.0 # https://github.com/pennersr/django-allauth -django-crispy-forms==1.9.0 # https://github.com/django-crispy-forms/django-crispy-forms +django-allauth==0.42.0 # https://github.com/pennersr/django-allauth +django-crispy-forms==1.9.1 # https://github.com/django-crispy-forms/django-crispy-forms {%- if cookiecutter.use_compressor == "y" %} django-compressor==2.4 # https://github.com/django-compressor/django-compressor {%- endif %} -django-redis==4.11.0 # https://github.com/jazzband/django-redis +django-redis==4.12.1 # https://github.com/jazzband/django-redis {%- if cookiecutter.use_drf == "y" %} # Django REST Framework djangorestframework==3.11.0 # https://github.com/encode/django-rest-framework From e4a4d900688fe389eb45d40ed7d8b7808a7a5125 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sun, 21 Jun 2020 14:48:28 +0100 Subject: [PATCH 49/49] Add badge for documentation build status --- README.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.rst b/README.rst index 02f220cf3..cfb253787 100644 --- a/README.rst +++ b/README.rst @@ -5,6 +5,10 @@ Cookiecutter Django :target: https://travis-ci.org/pydanny/cookiecutter-django?branch=master :alt: Build Status +.. image:: https://readthedocs.org/projects/cookiecutter-django/badge/?version=latest + :target: https://cookiecutter-django.readthedocs.io/en/latest/?badge=latest + :alt: Documentation Status + .. image:: https://pyup.io/repos/github/pydanny/cookiecutter-django/shield.svg :target: https://pyup.io/repos/github/pydanny/cookiecutter-django/ :alt: Updates