Merge branch 'master' into patch-1

This commit is contained in:
Bruno Alla 2020-10-04 16:06:52 +01:00
commit 06a1aa1309
20 changed files with 45 additions and 34 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.1.3
with:
python-version: 3.8

View File

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

View File

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

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,19 @@ All enhancements and patches to Cookiecutter Django will be documented in this f
<!-- GENERATOR_PLACEHOLDER -->
## [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

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

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

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.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']

View File

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

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

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

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)