From fa6ca7b1c853f46a2124ef2f69bb29967409cb13 Mon Sep 17 00:00:00 2001 From: jeromecaisip Date: Mon, 2 Mar 2020 19:16:33 +0100 Subject: [PATCH 01/16] Add rest_framework.authtoken on installed apps. Add rest_framework.authtoken on installed apps when the option to use DRF is selected, because the endpoint '/auth-token/" depends on the said app. --- {{cookiecutter.project_slug}}/config/settings/base.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/{{cookiecutter.project_slug}}/config/settings/base.py b/{{cookiecutter.project_slug}}/config/settings/base.py index 6ad8e820b..a771ed46e 100644 --- a/{{cookiecutter.project_slug}}/config/settings/base.py +++ b/{{cookiecutter.project_slug}}/config/settings/base.py @@ -79,6 +79,10 @@ THIRD_PARTY_APPS = [ {%- if cookiecutter.use_celery == 'y' %} "django_celery_beat", {%- endif %} +{% if cookiecutter.use_drf == "y" -%} + "rest_framework.authtoken", +{%- endif %} + ] LOCAL_APPS = [ From bfe463fa7c5731d0219f113f5f192f9a421aa472 Mon Sep 17 00:00:00 2001 From: jeromecaisip Date: Mon, 2 Mar 2020 19:27:07 +0100 Subject: [PATCH 02/16] Update base.py --- {{cookiecutter.project_slug}}/config/settings/base.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/base.py b/{{cookiecutter.project_slug}}/config/settings/base.py index a771ed46e..22b1fed81 100644 --- a/{{cookiecutter.project_slug}}/config/settings/base.py +++ b/{{cookiecutter.project_slug}}/config/settings/base.py @@ -79,10 +79,9 @@ THIRD_PARTY_APPS = [ {%- if cookiecutter.use_celery == 'y' %} "django_celery_beat", {%- endif %} -{% if cookiecutter.use_drf == "y" -%} +{%- if cookiecutter.use_drf == "y" %} "rest_framework.authtoken", {%- endif %} - ] LOCAL_APPS = [ From 4825b932c7e81075db901abae019fcd358467a5c Mon Sep 17 00:00:00 2001 From: jeromecaisip Date: Tue, 3 Mar 2020 14:45:20 +0100 Subject: [PATCH 03/16] Optionally remove/add restframework according to choice --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 99c9d4cd9..601ee96ff 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -29,5 +29,7 @@ django-compressor==2.4 # https://github.com/django-compressor/django-compressor {%- endif %} django-redis==4.11.0 # https://github.com/niwinz/django-redis +{%- if cookiecutter.use_drf == "y" %} # Django REST Framework djangorestframework==3.11.0 # https://github.com/encode/django-rest-framework +{%- endif %} From 09fd30b6a87f004d0f319af28968c13ad317b01e Mon Sep 17 00:00:00 2001 From: browniebroke Date: Fri, 6 Mar 2020 11:00:31 +0000 Subject: [PATCH 04/16] Update sphinx from 2.4.3 to 2.4.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 80558f5c7..dcffd53ec 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -2,7 +2,7 @@ Werkzeug==1.0.0 # https://github.com/pallets/werkzeug ipdb==0.13.2 # https://github.com/gotcha/ipdb -Sphinx==2.4.3 # https://github.com/sphinx-doc/sphinx +Sphinx==2.4.4 # https://github.com/sphinx-doc/sphinx {%- if cookiecutter.use_docker == 'y' %} psycopg2==2.8.4 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 {%- else %} From 3a3550cd3f4abe2990298d2d9c5368e88bdf6817 Mon Sep 17 00:00:00 2001 From: jeromecaisip Date: Sun, 8 Mar 2020 17:55:19 +0100 Subject: [PATCH 05/16] Update base.txt --- {{cookiecutter.project_slug}}/requirements/base.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 601ee96ff..3b72da7f6 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -28,7 +28,6 @@ django-crispy-forms==1.9.0 # https://github.com/django-crispy-forms/django-cris django-compressor==2.4 # https://github.com/django-compressor/django-compressor {%- endif %} django-redis==4.11.0 # https://github.com/niwinz/django-redis - {%- if cookiecutter.use_drf == "y" %} # Django REST Framework djangorestframework==3.11.0 # https://github.com/encode/django-rest-framework From 9ec538962ec692a3a65241038b5b57906c01e559 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Mon, 9 Mar 2020 13:51:23 -0700 Subject: [PATCH 06/16] Update FUNDING.yml --- .github/FUNDING.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 9f4c97f31..6ea27a8f0 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,7 +1,7 @@ # These are supported funding model platforms github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] -patreon: danielroygreenfeld +patreon: roygreenfeld 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 From 427c69562e94063a650215f72a2524c6fe37c031 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Wed, 11 Mar 2020 11:00:31 +0000 Subject: [PATCH 07/16] Update mypy from 0.761 to 0.770 --- {{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 dcffd53ec..ddc5d2a51 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.761 # https://github.com/python/mypy +mypy==0.770 # https://github.com/python/mypy django-stubs==1.4.0 # https://github.com/typeddjango/django-stubs pytest==5.3.5 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.2 # https://github.com/Frozenball/pytest-sugar From 7e345d5fb3fa17bb1b547198dc1d223c2ef391c2 Mon Sep 17 00:00:00 2001 From: Agustin Scaramuzza Date: Wed, 11 Mar 2020 14:37:12 -0300 Subject: [PATCH 08/16] Add PYTHONDONTWRITEBYTECODE flag to local development Dockerfile --- CONTRIBUTORS.rst | 1 + {{cookiecutter.project_slug}}/compose/local/django/Dockerfile | 1 + 2 files changed, 2 insertions(+) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 86804b69d..edb2ccdd3 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -49,6 +49,7 @@ Listed in alphabetical order. Adam Dobrawy `@ad-m`_ Adam Steele `@adammsteele`_ Agam Dua + Agustín Scaramuzza `@scaramagus`_ @scaramagus Alberto Sanchez `@alb3rto`_ Alex Tsai `@caffodian`_ Alvaro [Andor] `@andor-pierdelacabeza`_ diff --git a/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile index 94c799520..6a356ac60 100644 --- a/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile @@ -1,6 +1,7 @@ FROM python:3.7-slim-buster ENV PYTHONUNBUFFERED 1 +ENV PYTHONDONTWRITEBYTECODE 1 RUN apt-get update \ # dependencies for building Python packages From 324e3074029cccb4d0e4b1ca155087798f7f88cc Mon Sep 17 00:00:00 2001 From: browniebroke Date: Fri, 13 Mar 2020 11:00:34 +0000 Subject: [PATCH 09/16] Update pre-commit from 2.1.1 to 2.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 ddc5d2a51..fd8c104ab 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -26,7 +26,7 @@ pylint-django==2.0.14 # 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.1.1 # https://github.com/pre-commit/pre-commit +pre-commit==2.2.0 # https://github.com/pre-commit/pre-commit # Django # ------------------------------------------------------------------------------ From 81d9274e09fdbbd72ad959ac5daf1b8e93b0db57 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Fri, 13 Mar 2020 07:21:10 -0700 Subject: [PATCH 10/16] Update pytest from 5.3.5 to 5.4.1 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 140dc2cdd..bc8292a8c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,7 +11,7 @@ flake8-isort==2.8.0 # Testing # ------------------------------------------------------------------------------ tox==3.14.5 -pytest==5.3.5 +pytest==5.4.1 pytest-cookies==0.5.1 pytest-instafail==0.4.1.post0 pyyaml==5.3 From 6d0a187addb1fb616568859f268ab503870d2d00 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Fri, 13 Mar 2020 14:32:25 -0700 Subject: [PATCH 11/16] Update FUNDING.yml --- .github/FUNDING.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 6ea27a8f0..5a5aefc78 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,6 +1,6 @@ # These are supported funding model platforms -github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +github: pydanny patreon: roygreenfeld open_collective: # Replace with a single Open Collective username ko_fi: # Replace with a single Ko-fi username From 95057c47695c4a7f0535dd7aba7b13c6f004eb1c Mon Sep 17 00:00:00 2001 From: browniebroke Date: Sun, 15 Mar 2020 11:00:30 +0000 Subject: [PATCH 12/16] Update django-stubs from 1.4.0 to 1.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 fd8c104ab..ee2e1d41e 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.770 # https://github.com/python/mypy -django-stubs==1.4.0 # https://github.com/typeddjango/django-stubs +django-stubs==1.5.0 # https://github.com/typeddjango/django-stubs pytest==5.3.5 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.2 # https://github.com/Frozenball/pytest-sugar From fa8311405d98bef284301424006c93cf4e7fc06e Mon Sep 17 00:00:00 2001 From: Guilherme Guy Date: Sun, 15 Mar 2020 09:23:21 -0300 Subject: [PATCH 13/16] Fixes gitlabCI failing due to postgres config --- {{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 15ff73b10..91ad7238c 100644 --- a/{{cookiecutter.project_slug}}/.gitlab-ci.yml +++ b/{{cookiecutter.project_slug}}/.gitlab-ci.yml @@ -6,6 +6,7 @@ variables: POSTGRES_USER: '{{ cookiecutter.project_slug }}' POSTGRES_PASSWORD: '' POSTGRES_DB: 'test_{{ cookiecutter.project_slug }}' + POSTGRES_HOST_AUTH_METHOD: trust flake8: stage: lint From 0822add31145a6a8ba27ce8455087b841f29a3c8 Mon Sep 17 00:00:00 2001 From: Guilherme Guy Date: Sun, 15 Mar 2020 09:29:07 -0300 Subject: [PATCH 14/16] Adds @guilherme1guy to CONTRIBUTORS --- CONTRIBUTORS.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 86804b69d..fb65dc274 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -118,6 +118,7 @@ Listed in alphabetical order. Garry Cairns `@garry-cairns`_ Garry Polley `@garrypolley`_ Gilbishkosma `@Gilbishkosma`_ + Guilherme Guy `@guilherme1guy`_ Hamish Durkin `@durkode`_ Hana Quadara `@hanaquadara`_ Harry Moreno `@morenoh149`_ @morenoh149 @@ -275,6 +276,7 @@ Listed in alphabetical order. .. _@dhepper: https://github.com/dhepper .. _@dot2dotseurat: https://github.com/dot2dotseurat .. _@dsclementsen: https://github.com/dsclementsen +.. _@guilherme1guy: https://github.com/guilherme1guy .. _@durkode: https://github.com/durkode .. _@Egregors: https://github.com/Egregors .. _@epileptic-fish: https://gihub.com/epileptic-fish From 783e61bee7677bc31c8d614d775120430c22df6d Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sun, 15 Mar 2020 19:11:43 +0000 Subject: [PATCH 15/16] Fix broken link in list of contributors --- CONTRIBUTORS.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 326165721..d2418f8a9 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -353,6 +353,7 @@ Listed in alphabetical order. .. _@rolep: https://github.com/rolep .. _@romanosipenko: https://github.com/romanosipenko .. _@saschalalala: https://github.com/saschalalala +.. _@scaramagus: https://github.com/scaramagus .. _@shireenrao: https://github.com/shireenrao .. _@show0k: https://github.com/show0k .. _@shultz: https://github.com/shultz From 530868d072248b4472fb09a42e511c6024f361dd Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sun, 15 Mar 2020 19:20:44 +0000 Subject: [PATCH 16/16] Move "rest_framework" in THIRD_PARTY_APPS --- {{cookiecutter.project_slug}}/config/settings/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/base.py b/{{cookiecutter.project_slug}}/config/settings/base.py index 22b1fed81..c3941fd9e 100644 --- a/{{cookiecutter.project_slug}}/config/settings/base.py +++ b/{{cookiecutter.project_slug}}/config/settings/base.py @@ -75,11 +75,11 @@ THIRD_PARTY_APPS = [ "allauth", "allauth.account", "allauth.socialaccount", - "rest_framework", {%- if cookiecutter.use_celery == 'y' %} "django_celery_beat", {%- endif %} {%- if cookiecutter.use_drf == "y" %} + "rest_framework", "rest_framework.authtoken", {%- endif %} ]