diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index c66e6bc7..ced9c732 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,7 +1,7 @@ # These are supported funding model platforms github: [pydanny, browniebroke] -patreon: roygreenfeld +patreon: feldroy 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 diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md index b2b577f5..757b5990 100644 --- a/.github/ISSUE_TEMPLATE/bug.md +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -1,7 +1,6 @@ --- name: Bug Report about: Report a bug -title: '[bug]' labels: bug --- diff --git a/.github/ISSUE_TEMPLATE/feature.md b/.github/ISSUE_TEMPLATE/feature.md index 8cc8141a..ab719770 100644 --- a/.github/ISSUE_TEMPLATE/feature.md +++ b/.github/ISSUE_TEMPLATE/feature.md @@ -1,7 +1,6 @@ --- name: New Feature Proposal about: Propose a new feature -title: '[feature request]' labels: enhancement --- diff --git a/.github/ISSUE_TEMPLATE/paid-support.md b/.github/ISSUE_TEMPLATE/paid-support.md index e553329f..7ebc0647 100644 --- a/.github/ISSUE_TEMPLATE/paid-support.md +++ b/.github/ISSUE_TEMPLATE/paid-support.md @@ -1,10 +1,6 @@ --- name: Paid Support Request about: Ask Core Team members to help you out -title: '' -labels: '' -assignees: '' - --- Provided your question goes beyond [regular support](https://github.com/pydanny/cookiecutter-django/issues/new?template=question.md), and/or the task at hand is of timely/high priority nature use the below information to reach out for contributors directly. diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md index f24e413f..9d609eb9 100644 --- a/.github/ISSUE_TEMPLATE/question.md +++ b/.github/ISSUE_TEMPLATE/question.md @@ -1,7 +1,6 @@ --- name: Question about: Please consider asking your question on StackOverflow or Slack -title: '[question]' labels: question --- diff --git a/.github/workflows/pre-commit-autoupdate.yml b/.github/workflows/pre-commit-autoupdate.yml index f07d1803..99881a78 100644 --- a/.github/workflows/pre-commit-autoupdate.yml +++ b/.github/workflows/pre-commit-autoupdate.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/setup-python@v2.1.2 + - uses: actions/setup-python@v2.1.3 with: python-version: 3.8 diff --git a/.github/workflows/update-changelog.yml b/.github/workflows/update-changelog.yml index ef9263f3..ce930855 100644 --- a/.github/workflows/update-changelog.yml +++ b/.github/workflows/update-changelog.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/checkout@v2 - name: Set up Python - uses: actions/setup-python@v2.1.2 + uses: actions/setup-python@v2.1.3 with: python-version: "3.8" - name: Install dependencies diff --git a/.github/workflows/update-contributors.yml b/.github/workflows/update-contributors.yml index ba7fd74b..0bbc9e0c 100644 --- a/.github/workflows/update-contributors.yml +++ b/.github/workflows/update-contributors.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v2 - name: Set up Python - uses: actions/setup-python@v2.1.2 + uses: actions/setup-python@v2.1.3 with: python-version: "3.8" - name: Install dependencies diff --git a/.travis.yml b/.travis.yml index 6039075a..bfd008e7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ matrix: - name: Basic Docker script: sh tests/test_docker.sh - name: Extended Docker - script: sh tests/test_docker.sh use_celery=y use_drf=y + script: sh tests/test_docker.sh use_celery=y use_drf=y js_task_runner=Gulp - name: Bare metal script: sh tests/test_bare.sh use_celery=y use_compressor=y services: diff --git a/CHANGELOG.md b/CHANGELOG.md index 8efd5341..8b25f9d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,19 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## [2020-10-01] +### Changed +- Bump actions/setup-python from v2.1.2 to v2.1.3 ([#2869](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2869)) +### Updated +- Update ipdb to 0.13.4 ([#2873](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2873)) +- Auto-update pre-commit hooks ([#2867](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2867)) +- Update uvicorn to 0.12.1 ([#2866](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2866)) +- Update isort to 5.5.4 ([#2864](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2864)) +- Update sentry-sdk to 0.18.0 ([#2863](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2863)) +- Update djangorestframework to 3.12.1 ([#2862](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2862)) +- Update pytest to 6.1.0 ([#2859](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2859)) +- Update django-debug-toolbar to 3.1.1 ([#2855](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2855)) + ## [2020-09-23] ### Updated - Update sentry-sdk to 0.17.7 ([#2847](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2847)) diff --git a/README.rst b/README.rst index ec663d3e..f964635f 100644 --- a/README.rst +++ b/README.rst @@ -110,16 +110,17 @@ This project is run by volunteers. Please support them in their efforts to maint Projects that provide financial support to the maintainers: -Django Crash Course + + ~~~~~~~~~~~~~~~~~~~~~~~~~ -.. image:: https://cdn.shopify.com/s/files/1/0304/6901/files/Django-Crash-Course-300x436.jpg - :name: Django Crash Course: Covers Django 3.0 and Python 3.8 +.. image:: https://cdn.shopify.com/s/files/1/0304/6901/products/Two-Scoops-of-Django-3-Alpha-Cover_540x_26507b15-e489-470b-8a97-02773dd498d1_1080x.jpg + :name: Two Scoops of Django 3.x :align: center - :alt: Django Crash Course - :target: https://www.roygreenfeld.com/products/django-crash-course + :alt: Two Scoops of Django + :target: https://www.feldroy.com/products//two-scoops-of-django-3-x -Django Crash Course for Django 3.0 and Python 3.8 is the best cheese-themed Django reference in the universe! +Two Scoops of Django 3.x is the best ice cream-themed Django reference in the universe! pyup ~~~~~~~~~~~~~~~~~~ diff --git a/requirements.txt b/requirements.txt index 717b9826..4dd32a39 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,14 +5,14 @@ binaryornot==0.4.4 # Code quality # ------------------------------------------------------------------------------ black==20.8b1 -isort==5.5.3 -flake8==3.8.3 +isort==5.5.4 +flake8==3.8.4 flake8-isort==4.0.0 # Testing # ------------------------------------------------------------------------------ tox==3.20.0 -pytest==6.0.2 +pytest==6.1.1 pytest-cookies==0.5.1 pytest-instafail==0.4.2 pyyaml==5.3.1 diff --git a/tests/test_bare.sh b/tests/test_bare.sh index cc1f1c36..61a66239 100755 --- a/tests/test_bare.sh +++ b/tests/test_bare.sh @@ -4,6 +4,7 @@ # sh tests/test_bare.sh set -o errexit +set -x # Install modern pip to use new resolver: # https://blog.python.org/2020/07/upgrade-pip-20-2-changes-20-3.html diff --git a/tests/test_docker.sh b/tests/test_docker.sh index 55771c14..740f8fc2 100755 --- a/tests/test_docker.sh +++ b/tests/test_docker.sh @@ -4,6 +4,7 @@ # sh tests/test_docker.sh set -o errexit +set -x # install test requirements pip install -r requirements.txt diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index d995d5aa..d341c129 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -16,12 +16,12 @@ repos: - id: black - repo: https://github.com/timothycrosley/isort - rev: 5.5.3 + rev: 5.5.4 hooks: - id: isort - repo: https://gitlab.com/pycqa/flake8 - rev: 3.8.3 + rev: 3.8.4 hooks: - id: flake8 args: ['--config=setup.cfg'] diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index c858b733..0ea58951 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -24,7 +24,7 @@ flower==0.9.5 # https://github.com/mher/flower {%- endif %} {%- endif %} {%- if cookiecutter.use_async == 'y' %} -uvicorn==0.11.8 # https://github.com/encode/uvicorn +uvicorn==0.12.1 # https://github.com/encode/uvicorn {%- endif %} # Django @@ -40,6 +40,6 @@ django-compressor==2.4 # https://github.com/django-compressor/django-compressor django-redis==4.12.1 # https://github.com/jazzband/django-redis {%- if cookiecutter.use_drf == "y" %} # Django REST Framework -djangorestframework==3.11.1 # https://github.com/encode/django-rest-framework +djangorestframework==3.12.1 # https://github.com/encode/django-rest-framework django-cors-headers==3.5.0 # https://github.com/adamchainz/django-cors-headers {%- endif %} diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 423ac374..1b5467e6 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -1,7 +1,7 @@ -r base.txt Werkzeug==1.0.1 # https://github.com/pallets/werkzeug -ipdb==0.13.3 # https://github.com/gotcha/ipdb +ipdb==0.13.4 # https://github.com/gotcha/ipdb {%- if cookiecutter.use_docker == 'y' %} psycopg2==2.8.6 # https://github.com/psycopg/psycopg2 {%- else %} @@ -13,9 +13,9 @@ watchgod==0.6 # https://github.com/samuelcolvin/watchgod # Testing # ------------------------------------------------------------------------------ -mypy==0.770 # https://github.com/python/mypy -django-stubs==1.5.0 # https://github.com/typeddjango/django-stubs -pytest==6.0.2 # https://github.com/pytest-dev/pytest +mypy==0.782 # https://github.com/python/mypy +django-stubs==1.6.0 # https://github.com/typeddjango/django-stubs +pytest==6.1.1 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.4 # https://github.com/Frozenball/pytest-sugar # Documentation @@ -25,7 +25,7 @@ sphinx-autobuild==2020.9.1 # https://github.com/GaretJax/sphinx-autobuild # Code quality # ------------------------------------------------------------------------------ -flake8==3.8.3 # https://github.com/PyCQA/flake8 +flake8==3.8.4 # https://github.com/PyCQA/flake8 flake8-isort==4.0.0 # https://github.com/gforcada/flake8-isort coverage==5.3 # https://github.com/nedbat/coveragepy black==20.8b1 # https://github.com/ambv/black @@ -39,7 +39,7 @@ pre-commit==2.7.1 # https://github.com/pre-commit/pre-commit # ------------------------------------------------------------------------------ factory-boy==3.0.1 # https://github.com/FactoryBoy/factory_boy -django-debug-toolbar==3.1 # https://github.com/jazzband/django-debug-toolbar +django-debug-toolbar==3.1.1 # https://github.com/jazzband/django-debug-toolbar django-extensions==3.0.9 # https://github.com/django-extensions/django-extensions django-coverage-plugin==1.8.0 # https://github.com/nedbat/django_coverage_plugin pytest-django==3.10.0 # https://github.com/pytest-dev/pytest-django diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 07ff0c52..34308c0b 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -8,7 +8,7 @@ psycopg2==2.8.6 # https://github.com/psycopg/psycopg2 Collectfast==2.2.0 # https://github.com/antonagestam/collectfast {%- endif %} {%- if cookiecutter.use_sentry == "y" %} -sentry-sdk==0.17.7 # https://github.com/getsentry/sentry-python +sentry-sdk==0.18.0 # https://github.com/getsentry/sentry-python {%- endif %} {%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %} hiredis==1.1.0 # https://github.com/redis/hiredis-py diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/admin.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/admin.py index cc6efed5..a68a94a9 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/admin.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/admin.py @@ -12,6 +12,8 @@ class UserAdmin(auth_admin.UserAdmin): form = UserChangeForm add_form = UserCreationForm - fieldsets = (("User", {"fields": ("name",)}),) + auth_admin.UserAdmin.fieldsets + fieldsets = (("User", {"fields": ("name",)}),) + tuple( + auth_admin.UserAdmin.fieldsets + ) list_display = ["username", "name", "is_superuser"] search_fields = ["name"] 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 18b8da7a..3638c8f6 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 @@ -64,7 +64,7 @@ class TestUserDetailView: def test_not_authenticated(self, user: User, rf: RequestFactory): request = rf.get("/fake-url/") - request.user = AnonymousUser() # type: ignore + request.user = AnonymousUser() response = user_detail_view(request, username=user.username)