Merge branch 'master' of github.com:pydanny/cookiecutter-django

This commit is contained in:
Andrew-Chen-Wang 2020-11-01 00:14:52 -04:00
commit 343f9b6fba
19 changed files with 109 additions and 45 deletions

2
.github/FUNDING.yml vendored
View File

@ -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

View File

@ -1,7 +1,6 @@
---
name: Bug Report
about: Report a bug
title: '[bug]'
labels: bug
---

View File

@ -1,7 +1,6 @@
---
name: New Feature Proposal
about: Propose a new feature
title: '[feature request]'
labels: enhancement
---

View File

@ -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.

View File

@ -1,7 +1,6 @@
---
name: Question
about: Please consider asking your question on StackOverflow or Slack
title: '[question]'
labels: question
---

View File

@ -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
with:
python-version: 3.8

View File

@ -15,9 +15,9 @@ jobs:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2.1.2
uses: actions/setup-python@v2
with:
python-version: "3.8"
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
@ -28,7 +28,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4.5.1
uses: stefanzweifel/git-auto-commit-action@v4.6.0
with:
commit_message: Update Changelog
file_pattern: CHANGELOG.md

View File

@ -13,9 +13,9 @@ jobs:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2.1.2
uses: actions/setup-python@v2
with:
python-version: "3.8"
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
@ -24,7 +24,7 @@ jobs:
run: python scripts/update_contributors.py
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4.5.1
uses: stefanzweifel/git-auto-commit-action@v4.6.0
with:
commit_message: Update Contributors
file_pattern: CONTRIBUTORS.md .github/contributors.json

View File

@ -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:

View File

@ -3,6 +3,72 @@ All enhancements and patches to Cookiecutter Django will be documented in this f
<!-- GENERATOR_PLACEHOLDER -->
## [2020-10-19]
### Updated
- Update sentry-sdk to 0.19.1 ([#2905](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2905))
## [2020-10-17]
### Updated
- Update django-allauth to 0.43.0 ([#2901](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2901))
- Update pytest-django to 4.0.0 ([#2903](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2903))
## [2020-10-15]
### Updated
- Update pillow to 8.0.0 ([#2898](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2898))
## [2020-10-14]
### Updated
- Auto-update pre-commit hooks ([#2897](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2897))
- Update sentry-sdk to 0.19.0 ([#2896](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2896))
## [2020-10-13]
### Updated
- Update isort to 5.6.4 ([#2895](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2895))
## [2020-10-12]
### Changed
- Bump stefanzweifel/git-auto-commit-action from v4.5.1 to v4.6.0 ([#2893](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2893))
### Updated
- Auto-update pre-commit hooks ([#2892](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2892))
## [2020-10-11]
### Updated
- Auto-update pre-commit hooks ([#2890](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2890))
- Update isort to 5.6.3 ([#2891](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2891))
- Update django-anymail to 8.1 ([#2887](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2887))
- Update tox to 3.20.1 ([#2885](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2885))
## [2020-10-09]
### Updated
- Auto-update pre-commit hooks ([#2884](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2884))
- Update isort to 5.6.1 ([#2883](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2883))
## [2020-10-08]
### Changed
- Add dedicated websockets package ([#2881](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2881))
### Updated
- Update isort to 5.6.0 ([#2882](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2882))
## [2020-10-04]
### Updated
- Update pytest to 6.1.1 ([#2880](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2880))
- Update mypy and django-stubs ([#2874](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2874))
- Auto-update pre-commit hooks ([#2876](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2876))
- Update flake8 to 3.8.4 ([#2877](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2877))
## [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))

View File

@ -5,14 +5,14 @@ binaryornot==0.4.4
# Code quality
# ------------------------------------------------------------------------------
black==20.8b1
isort==5.5.3
flake8==3.8.3
isort==5.6.4
flake8==3.8.4
flake8-isort==4.0.0
# Testing
# ------------------------------------------------------------------------------
tox==3.20.0
pytest==6.0.2
tox==3.20.1
pytest==6.1.1
pytest-cookies==0.5.1
pytest-instafail==0.4.2
pyyaml==5.3.1

View File

@ -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

View File

@ -4,6 +4,7 @@
# sh tests/test_docker.sh
set -o errexit
set -x
# install test requirements
pip install -r requirements.txt

View File

@ -16,12 +16,12 @@ repos:
- id: black
- repo: https://github.com/timothycrosley/isort
rev: 5.5.3
rev: 5.6.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']

View File

@ -1,6 +1,6 @@
pytz==2020.1 # https://github.com/stub42/pytz
python-slugify==4.0.1 # https://github.com/un33k/python-slugify
Pillow==7.2.0 # https://github.com/python-pillow/Pillow
Pillow==8.0.0 # https://github.com/python-pillow/Pillow
{%- if cookiecutter.use_compressor == "y" %}
{%- if cookiecutter.windows == 'y' and cookiecutter.use_docker == 'n' %}
rcssmin==1.0.6 --install-option="--without-c-extensions" # https://github.com/ndparker/rcssmin
@ -24,7 +24,8 @@ 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
wsproto==0.15.0 # https://github.com/python-hyper/wsproto/
{%- endif %}
# Django
@ -32,7 +33,7 @@ uvicorn==0.11.8 # https://github.com/encode/uvicorn
django==3.0.10 # 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.42.0 # https://github.com/pennersr/django-allauth
django-allauth==0.43.0 # https://github.com/pennersr/django-allauth
django-crispy-forms==1.9.2 # 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
@ -40,6 +41,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 %}

View File

@ -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
pytest-django==4.0.0 # https://github.com/pytest-dev/pytest-django

View File

@ -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.19.1 # 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
@ -22,21 +22,21 @@ django-storages[boto3]==1.10.1 # https://github.com/jschneier/django-storages
django-storages[google]==1.10.1 # https://github.com/jschneier/django-storages
{%- endif %}
{%- if cookiecutter.mail_service == 'Mailgun' %}
django-anymail[mailgun]==8.0 # https://github.com/anymail/django-anymail
django-anymail[mailgun]==8.1 # https://github.com/anymail/django-anymail
{%- elif cookiecutter.mail_service == 'Amazon SES' %}
django-anymail[amazon_ses]==8.0 # https://github.com/anymail/django-anymail
django-anymail[amazon_ses]==8.1 # https://github.com/anymail/django-anymail
{%- elif cookiecutter.mail_service == 'Mailjet' %}
django-anymail[mailjet]==8.0 # https://github.com/anymail/django-anymail
django-anymail[mailjet]==8.1 # https://github.com/anymail/django-anymail
{%- elif cookiecutter.mail_service == 'Mandrill' %}
django-anymail[mandrill]==8.0 # https://github.com/anymail/django-anymail
django-anymail[mandrill]==8.1 # https://github.com/anymail/django-anymail
{%- elif cookiecutter.mail_service == 'Postmark' %}
django-anymail[postmark]==8.0 # https://github.com/anymail/django-anymail
django-anymail[postmark]==8.1 # https://github.com/anymail/django-anymail
{%- elif cookiecutter.mail_service == 'Sendgrid' %}
django-anymail[sendgrid]==8.0 # https://github.com/anymail/django-anymail
django-anymail[sendgrid]==8.1 # https://github.com/anymail/django-anymail
{%- elif cookiecutter.mail_service == 'SendinBlue' %}
django-anymail[sendinblue]==8.0 # https://github.com/anymail/django-anymail
django-anymail[sendinblue]==8.1 # https://github.com/anymail/django-anymail
{%- elif cookiecutter.mail_service == 'SparkPost' %}
django-anymail[sparkpost]==8.0 # https://github.com/anymail/django-anymail
django-anymail[sparkpost]==8.1 # https://github.com/anymail/django-anymail
{%- elif cookiecutter.mail_service == 'Other SMTP' %}
django-anymail==8.0 # https://github.com/anymail/django-anymail
django-anymail==8.1 # https://github.com/anymail/django-anymail
{%- endif %}

View File

@ -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"]

View File

@ -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)