diff --git a/.editorconfig b/.editorconfig index 261407067..6a9a5c45d 100644 --- a/.editorconfig +++ b/.editorconfig @@ -12,7 +12,7 @@ trim_trailing_whitespace = true indent_style = space indent_size = 4 -[*.{html,css,scss,json,yml}] +[*.{html,css,scss,json,yml,xml}] indent_style = space indent_size = 2 diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index ced9c732b..53a486671 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -9,4 +9,4 @@ community_bridge: # Replace with a single Community Bridge project-name e.g., cl liberapay: # Replace with a single Liberapay username issuehunt: # Replace with a single IssueHunt username otechie: # Replace with a single Otechie username -custom: ['https://www.patreon.com/browniebroke'] +custom: ["https://www.patreon.com/browniebroke"] diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md index d1bf4da68..e984493d8 100644 --- a/.github/ISSUE_TEMPLATE/bug.md +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -12,11 +12,11 @@ labels: bug -* Host system configuration: +* Host system configuration: * Version of cookiecutter CLI (get it with `cookiecutter --version`): * OS name and version: - On Linux, run + On Linux, run ```bash lsb_release -a 2> /dev/null || cat /etc/redhat-release 2> /dev/null || cat /etc/*-release 2> /dev/null || cat /etc/issue 2> /dev/null ``` @@ -25,7 +25,7 @@ labels: bug ```bash sw_vers ``` - + On Windows, via CMD, run ``` systeminfo | findstr /B /C:"OS Name" /C:"OS Version" @@ -34,7 +34,7 @@ labels: bug ```bash # Insert here the OS name and version - + ``` * Python version, run `python3 -V`: @@ -51,7 +51,7 @@ labels: bug Logs:
-$ cookiecutter https://github.com/pydanny/cookiecutter-django
+$ cookiecutter https://github.com/cookiecutter/cookiecutter-django
 project_name [Project Name]: ...
 
diff --git a/.github/ISSUE_TEMPLATE/paid-support.md b/.github/ISSUE_TEMPLATE/paid-support.md index 7ebc06476..9f997a8c8 100644 --- a/.github/ISSUE_TEMPLATE/paid-support.md +++ b/.github/ISSUE_TEMPLATE/paid-support.md @@ -3,7 +3,7 @@ name: Paid Support Request about: Ask Core Team members to help you out --- -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. +Provided your question goes beyond [regular support](https://github.com/cookiecutter/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. * Daniel Roy Greenfeld, Project Lead ([GitHub](https://github.com/pydanny), [Patreon](https://www.patreon.com/danielroygreenfeld)): expertise in Django and AWS ELB. diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md index 9d609eb98..e39803fa9 100644 --- a/.github/ISSUE_TEMPLATE/question.md +++ b/.github/ISSUE_TEMPLATE/question.md @@ -1,11 +1,11 @@ --- name: Question -about: Please consider asking your question on StackOverflow or Slack +about: Please ask your question on StackOverflow, Discord or GitHub Discussions. labels: question --- -First, make sure to examine [the docs](https://cookiecutter-django.readthedocs.io/en/latest/). +First, make sure to examine [the docs](https://cookiecutter-django.readthedocs.io/en/latest/). If that doesn't help, we recommend one of these 3 main channels: -If that doesn't help, post a question on [StackOverflow](https://stackoverflow.com/questions/tagged/cookiecutter-django) tagged with `cookiecutter-django`, you might get more visibility there than on our issue tracker. - -Finally, feel free to join [Slack](https://join.slack.com/t/cookie-cutter/shared_invite/enQtNzI0Mzg5NjE5Nzk5LTRlYWI2YTZhYmQ4YmU1Y2Q2NmE1ZjkwOGM0NDQyNTIwY2M4ZTgyNDVkNjMxMDdhZGI5ZGE5YmJjM2M3ODJlY2U) and ask around. +- If your issue is related to Django + something else but was generated with cookiecutter-django, the best is to post a question on [StackOverflow](https://stackoverflow.com/questions/tagged/cookiecutter-django) tagged with `cookiecutter-django`, you would get more visibility from other communities as well. +- Join us on [Discord](https://discord.gg/bTfDa6Zz) and ask around. +- Start [a discussion](https://github.com/cookiecutter/cookiecutter-django/discussions) on our project's GitHub. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 5559e62ff..10b66e266 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -7,12 +7,12 @@ Checklist: -- [ ] I've made sure that `tests/test_cookiecutter_generation.py` is updated accordingly (especially if adding or updating a template option) +- [ ] I've made sure that tests are updated accordingly (especially if adding or updating a template option) - [ ] I've updated the documentation or confirm that my change doesn't require any updates ## Rationale - diff --git a/.github/changelog-template.md b/.github/changelog-template.md index 49550ba12..50aab38e1 100644 --- a/.github/changelog-template.md +++ b/.github/changelog-template.md @@ -1,9 +1,8 @@ -## [{{merge_date.strftime('%Y-%m-%d')}}] {%- for change_type, pulls in grouped_pulls.items() %} {%- if pulls %} ### {{ change_type }} {%- for pull_request in pulls %} -- {{ pull_request.title }} ([#{{ pull_request.number }}]({{ pull_request.url }})) +- {{ pull_request.title }} ([#{{ pull_request.number }}]({{ pull_request.html_url }})) {%- endfor -%} {% endif -%} {% endfor -%} diff --git a/.github/contributors.json b/.github/contributors.json index 0a4f213c0..8fd9c258b 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1127,5 +1127,105 @@ "name": "Mike97M", "github_login": "Mike97M", "twitter_username": "" + }, + { + "name": "Charlie Macfarlane Brodie", + "github_login": "tannart", + "twitter_username": "" + }, + { + "name": "Floyd Hightower", + "github_login": "fhightower", + "twitter_username": "" + }, + { + "name": "Manjit Pardeshi", + "github_login": "Manjit2003", + "twitter_username": "" + }, + { + "name": "Meraj ", + "github_login": "ichbinmeraj", + "twitter_username": "merajsafari" + }, + { + "name": "dalrrard", + "github_login": "dalrrard", + "twitter_username": "" + }, + { + "name": "Liam Brenner", + "github_login": "SableWalnut", + "twitter_username": "" + }, + { + "name": "Noah H", + "github_login": "nthall", + "twitter_username": "" + }, + { + "name": "Diego Montes", + "github_login": "d57montes", + "twitter_username": "" + }, + { + "name": "Chao Yang Wu", + "github_login": "goatwu1993", + "twitter_username": "" + }, + { + "name": "mpoli", + "github_login": "mpoli", + "twitter_username": "" + }, + { + "name": "Zach Borboa", + "github_login": "zachborboa", + "twitter_username": "" + }, + { + "name": "Timm Simpkins", + "github_login": "PoDuck", + "twitter_username": "" + }, + { + "name": "Douglas", + "github_login": "douglascdev", + "twitter_username": "" + }, + { + "name": "Will Gordon", + "github_login": "wgordon17", + "twitter_username": "" + }, + { + "name": "Bogdan Mateescu", + "github_login": "mateesville93", + "twitter_username": "" + }, + { + "name": "Fuzzwah", + "github_login": "Fuzzwah", + "twitter_username": "" + }, + { + "name": "Thibault J.", + "github_login": "thibault", + "twitter_username": "thibault" + }, + { + "name": "Pedro Campos", + "github_login": "pcampos119104", + "twitter_username": "" + }, + { + "name": "Vikas Yadav", + "github_login": "vik-y", + "twitter_username": "" + }, + { + "name": "Abdullah Adeel", + "github_login": "mabdullahadeel", + "twitter_username": "abdadeel_" } ] diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f0b70dd0e..8922cd450 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,12 +1,20 @@ # Config for Dependabot updates. See Documentation here: -# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates +# https://docs.github.com/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates version: 2 updates: - # Update Github actions in workflows + # Update GitHub actions in workflows - package-ecosystem: "github-actions" directory: "/" schedule: interval: "daily" labels: - "update" + + # Update npm packages + - package-ecosystem: "npm" + directory: "{{cookiecutter.project_slug}}/" + schedule: + interval: "daily" + labels: + - "update" diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml deleted file mode 100644 index 734a541af..000000000 --- a/.github/release-drafter.yml +++ /dev/null @@ -1,29 +0,0 @@ -categories: - - title: 'Breaking Changes' - labels: - - 'breaking' - - title: 'Major Changes' - labels: - - 'major' - - title: 'Minor Changes' - labels: - - 'enhancement' - - title: 'Bugfixes' - labels: - - 'bug' - - title: 'Removals' - labels: - - 'removed' - - title: 'Documentation updates' - labels: - - 'docs' - -exclude-labels: - - 'skip-changelog' - - 'update' - - 'project infrastructure' - -template: | - ## Changes - - $CHANGES diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a1b635959..0180184fa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,33 +2,43 @@ name: CI on: push: - branches: [ master ] pull_request: jobs: - tox: + lint: runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: "3.9" + cache: pip + - name: Run pre-commit + uses: pre-commit/action@v2.0.3 + + tests: strategy: fail-fast: false matrix: - tox-env: - - py39 - - black-template + os: + - ubuntu-latest + - windows-latest + - macOS-latest + name: "Run tests" + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 - - uses: actions/setup-python@v2.2.2 + - uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: "3.9" + cache: pip - name: Install dependencies - run: | - python -m pip install -U pip - python -m pip install -U tox - - name: Tox ${{ matrix.tox-env }} - run: tox -e ${{ matrix.tox-env }} + run: pip install -r requirements.txt + - name: Run tests + run: pytest tests docker: - runs-on: ubuntu-latest strategy: fail-fast: false matrix: @@ -38,27 +48,35 @@ jobs: - name: Extended args: "use_celery=y use_drf=y js_task_runner=Gulp" + name: "${{ matrix.script.name }} Docker" + runs-on: ubuntu-latest env: DOCKER_BUILDKIT: 1 COMPOSE_DOCKER_CLI_BUILD: 1 steps: - uses: actions/checkout@v2 - - uses: actions/setup-python@v2.2.2 + - uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: "3.9" + cache: pip + - name: Install dependencies + run: pip install -r requirements.txt - name: Docker ${{ matrix.script.name }} run: sh tests/test_docker.sh ${{ matrix.script.args }} bare: - runs-on: ubuntu-latest strategy: fail-fast: false matrix: script: - name: With Celery args: "use_celery=y use_compressor=y" + - name: With Gulp + args: "js_task_runner=Gulp custom_bootstrap_compilation=y" + runs-on: ubuntu-latest + name: "${{ matrix.script.name }} Bare metal" services: redis: image: redis:5.0 @@ -78,8 +96,18 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: actions/setup-python@v2.2.2 + - uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: "3.9" + cache: pip + cache-dependency-path: | + requirements.txt + {{cookiecutter.project_slug}}/requirements/base.txt + {{cookiecutter.project_slug}}/requirements/local.txt + - name: Install dependencies + run: pip install -r requirements.txt + - uses: actions/setup-node@v2 + with: + node-version: "16" - name: Bare Metal ${{ matrix.script.name }} run: sh tests/test_bare.sh ${{ matrix.script.args }} diff --git a/.github/workflows/django-issue-checker.yml b/.github/workflows/django-issue-checker.yml new file mode 100644 index 000000000..1118e1b23 --- /dev/null +++ b/.github/workflows/django-issue-checker.yml @@ -0,0 +1,30 @@ +# Creates a new issue for Major/Minor Django updates that keeps track +# of all dependencies that need to be updated/merged in order for the +# latest Django version to also be merged. +name: Django Issue Checker + +on: + schedule: + - cron: "28 5 * * *" + # Manual trigger + workflow_dispatch: + +jobs: + issue-checker: + # Disables this workflow from running in a repository that is not part of the indicated organization/user + if: github.repository_owner == 'cookiecutter' + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: "3.9" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Create Django Major Issue + run: python scripts/create_django_issue.py + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml deleted file mode 100644 index 6c2d6620d..000000000 --- a/.github/workflows/draft-release.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Release Drafter - -on: - push: - branches: - - master - -jobs: - release_notes: - runs-on: ubuntu-latest - steps: - - uses: release-drafter/release-drafter@v5 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/issue-manager.yml b/.github/workflows/issue-manager.yml index 6e272f75f..a6e074137 100644 --- a/.github/workflows/issue-manager.yml +++ b/.github/workflows/issue-manager.yml @@ -1,62 +1,40 @@ -# Automatically close issues that have a keyword mark (an HTML comment) -# in the last comment in the issue, by a group of predefined users, after a custom delay. +# Automatically close issues or pull requests that have a label, after a custom delay, if no one replies. # https://github.com/tiangolo/issue-manager - -# Default config: -# -# Wait 10 days and comment: "Assuming the original issue was solved, it will be automatically closed now" - -# Extra config: -# '' -# Wait 10 days and comment: "Automatically closing. To re-open, please provide the additional information requested" - name: Issue Manager on: - # Every day at midnight schedule: - - cron: "0 0 * * *" - # Manual trigger + - cron: "12 0 * * *" + issue_comment: + types: + - created + issues: + types: + - labeled + pull_request_target: + types: + - labeled workflow_dispatch: jobs: issue-manager: + # Disables this workflow from running in a repository that is not part of the indicated organization/user + if: github.repository_owner == 'cookiecutter' + runs-on: ubuntu-latest steps: - - uses: tiangolo/issue-manager@0.4.0 - with: - token: ${{ secrets.GITHUB_TOKEN }} - - config: > - { - "answered": { - "delay": 864000, - "message": "Assuming the original issue was solved, it will be automatically closed now.", - "users": [ - "pydanny", - "audreyr", - "luzfcb", - "theskumar", - "jayfk", - "burhan", - "webyneter", - "browniebroke", - "sfdye" - ] - }, - "waiting": { - "delay": 864000, - "message": "Automatically closing. To re-open, please provide the additional information requested.", - "users": [ - "pydanny", - "audreyr", - "luzfcb", - "theskumar", - "jayfk", - "burhan", - "webyneter", - "browniebroke", - "sfdye" - ] + - uses: tiangolo/issue-manager@0.4.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + config: > + { + "answered": { + "message": "Assuming the question was answered, this will be automatically closed now." + }, + "solved": { + "message": "Assuming the original issue was solved, it will be automatically closed now." + }, + "waiting": { + "message": "Automatically closing after waiting for additional info. To re-open, please provide the additional information requested." + } } - } diff --git a/.github/workflows/pre-commit-autoupdate.yml b/.github/workflows/pre-commit-autoupdate.yml index 25a6f7a0a..e92816101 100644 --- a/.github/workflows/pre-commit-autoupdate.yml +++ b/.github/workflows/pre-commit-autoupdate.yml @@ -1,36 +1,41 @@ # Run pre-commit autoupdate every day at midnight # and create a pull request if any changes - name: Pre-commit auto-update on: schedule: - - cron: "0 0 * * *" + - cron: "15 2 * * *" workflow_dispatch: # to trigger manually jobs: auto-update: + # Disables this workflow from running in a repository that is not part of the indicated organization/user + if: github.repository_owner == 'cookiecutter' + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2.2.2 - with: - python-version: 3.9 + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: "3.9" - - name: Install pre-commit - run: pip install pre-commit + - name: Install pre-commit + run: pip install pre-commit - - name: Run pre-commit autoupdate - working-directory: "{{cookiecutter.project_slug}}" - run: pre-commit autoupdate + - name: Autoupdate template + run: pre-commit autoupdate - - name: Create Pull Request - uses: peter-evans/create-pull-request@v3.10.0 - with: - token: ${{ secrets.GITHUB_TOKEN }} - branch: update/pre-commit-autoupdate - title: Auto-update pre-commit hooks - commit-message: Auto-update pre-commit hooks - body: Update versions of tools in pre-commit configs to latest version - labels: update + - name: Autoupdate generated projects + working-directory: "{{cookiecutter.project_slug}}" + run: pre-commit autoupdate + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v3.12.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + branch: update/pre-commit-autoupdate + title: Auto-update pre-commit hooks + commit-message: Auto-update pre-commit hooks + body: Update versions of tools in pre-commit configs to latest version + labels: update diff --git a/.github/workflows/update-changelog.yml b/.github/workflows/update-changelog.yml index 6270fe61b..00065c05b 100644 --- a/.github/workflows/update-changelog.yml +++ b/.github/workflows/update-changelog.yml @@ -8,27 +8,27 @@ on: workflow_dispatch: jobs: - build: + release: + # Disables this workflow from running in a repository that is not part of the indicated organization/user + if: github.repository_owner == 'cookiecutter' + runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2.2.2 - with: - python-version: 3.9 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - - name: Update list - run: python scripts/update_changelog.py - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Commit changes - uses: stefanzweifel/git-auto-commit-action@v4.11.0 - with: - commit_message: Update Changelog - file_pattern: CHANGELOG.md + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: "3.9" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Set git details + run: | + git config --global user.name "github-actions" + git config --global user.email "action@github.com" + - name: Update list + run: python scripts/update_changelog.py + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/update-contributors.yml b/.github/workflows/update-contributors.yml index ebf1c239e..335159444 100644 --- a/.github/workflows/update-contributors.yml +++ b/.github/workflows/update-contributors.yml @@ -7,24 +7,26 @@ on: jobs: build: + # Disables this workflow from running in a repository that is not part of the indicated organization/user + if: github.repository_owner == 'cookiecutter' + runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2.2.2 - with: - python-version: 3.9 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - - name: Update list - run: python scripts/update_contributors.py + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: "3.9" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Update list + run: python scripts/update_contributors.py - - name: Commit changes - uses: stefanzweifel/git-auto-commit-action@v4.11.0 - with: - commit_message: Update Contributors - file_pattern: CONTRIBUTORS.md .github/contributors.json + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v4.13.1 + with: + commit_message: Update Contributors + file_pattern: CONTRIBUTORS.md .github/contributors.json diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..63add8bf5 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,29 @@ +exclude: "{{cookiecutter.project_slug}}" +default_stages: [commit] + +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.1.0 + hooks: + - id: trailing-whitespace + - id: check-yaml + + - repo: https://github.com/psf/black + rev: 21.12b0 + hooks: + - id: black + + - repo: https://github.com/PyCQA/isort + rev: 5.10.1 + hooks: + - id: isort + + - repo: https://github.com/PyCQA/flake8 + rev: 4.0.1 + hooks: + - id: flake8 + +ci: + autoupdate_schedule: weekly + skip: [] + submodules: false diff --git a/.pyup.yml b/.pyup.yml index b330b22bb..e5d4752e4 100644 --- a/.pyup.yml +++ b/.pyup.yml @@ -15,6 +15,7 @@ label_prs: update requirements: - "requirements.txt" + - "docs/requirements.txt" - "{{cookiecutter.project_slug}}/requirements/base.txt" - "{{cookiecutter.project_slug}}/requirements/local.txt" - "{{cookiecutter.project_slug}}/requirements/production.txt" diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 000000000..beb30d845 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,15 @@ +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: docs/conf.py + +# Version of Python and requirements required to build the docs +python: + version: "3.8" + install: + - requirements: docs/requirements.txt diff --git a/CHANGELOG.md b/CHANGELOG.md index 110c3b3f0..b2fb058b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,703 +3,1236 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2022.01.27 + +### Updated +- Update redis to 4.1.2 ([#3551](https://github.com/cookiecutter/cookiecutter-django/pull/3551)) + +## 2022.01.26 + +### Updated +- Update coverage to 6.3 ([#3550](https://github.com/cookiecutter/cookiecutter-django/pull/3550)) +- Update sentry-sdk to 1.5.4 ([#3549](https://github.com/cookiecutter/cookiecutter-django/pull/3549)) +- Update django-crispy-forms to 1.14.0 ([#3548](https://github.com/cookiecutter/cookiecutter-django/pull/3548)) +- Update uvicorn to 0.17.0.post1 ([#3547](https://github.com/cookiecutter/cookiecutter-django/pull/3547)) + +## 2022.01.21 + +### Changed +- mysql support link ([#3544](https://github.com/cookiecutter/cookiecutter-django/pull/3544)) +### Updated +- Update sentry-sdk to 1.5.3 ([#3543](https://github.com/cookiecutter/cookiecutter-django/pull/3543)) +- Update django-anymail to 8.5 ([#3542](https://github.com/cookiecutter/cookiecutter-django/pull/3542)) + +## 2022.01.19 + +### Changed +- Add swagger API documentation when DRF is enabled ([#3536](https://github.com/cookiecutter/cookiecutter-django/pull/3536)) +### Updated +- Update pre-commit to 2.17.0 ([#3541](https://github.com/cookiecutter/cookiecutter-django/pull/3541)) + +## 2022.01.17 + +### Changed +- Avoid docker image/volume collision by prefixing with project slug ([#3528](https://github.com/cookiecutter/cookiecutter-django/pull/3528)) +### Updated +- Update redis to 4.1.1 ([#3540](https://github.com/cookiecutter/cookiecutter-django/pull/3540)) +- Update sphinx to 4.4.0 ([#3537](https://github.com/cookiecutter/cookiecutter-django/pull/3537)) + +## 2022.01.14 + +### Updated +- Update uvicorn to 0.17.0 ([#3534](https://github.com/cookiecutter/cookiecutter-django/pull/3534)) +- Bump stefanzweifel/git-auto-commit-action from 4.13.0 to 4.13.1 ([#3532](https://github.com/cookiecutter/cookiecutter-django/pull/3532)) + +## 2022.01.13 + +### Changed +- Add UserSignupForm and UserSocialSignupForm ([#3515](https://github.com/cookiecutter/cookiecutter-django/pull/3515)) +### Fixed +- Fix high CPU usage when running `runserver_plus` in Docker ([#3531](https://github.com/cookiecutter/cookiecutter-django/pull/3531)) +- Fix out-of-sync sequence for Site ID ([#3511](https://github.com/cookiecutter/cookiecutter-django/pull/3511)) + +## 2022.01.11 + +### Updated +- Bump stefanzweifel/git-auto-commit-action from 4.12.0 to 4.13.0 ([#3527](https://github.com/cookiecutter/cookiecutter-django/pull/3527)) + +## 2022.01.10 + +### Updated +- Update django-cors-headers to 3.11.0 ([#3526](https://github.com/cookiecutter/cookiecutter-django/pull/3526)) +- Update sentry-sdk to 1.5.2 ([#3525](https://github.com/cookiecutter/cookiecutter-django/pull/3525)) +- Update gitpython to 3.1.26 ([#3524](https://github.com/cookiecutter/cookiecutter-django/pull/3524)) + +## 2022.01.09 + +### Changed +- Fix broken center align of image links in README ([#3522](https://github.com/cookiecutter/cookiecutter-django/pull/3522)) + +## 2022.01.07 + +### Fixed +- Fix cache dependency path for linter job in CI workflow ([#3520](https://github.com/cookiecutter/cookiecutter-django/pull/3520)) +- Fix `open` option for `initBrowserSync` when using Docker ([#3519](https://github.com/cookiecutter/cookiecutter-django/pull/3519)) +### Updated +- Update mypy to 0.931 ([#3521](https://github.com/cookiecutter/cookiecutter-django/pull/3521)) +- Update gitpython to 3.1.25 ([#3518](https://github.com/cookiecutter/cookiecutter-django/pull/3518)) + +## 2022.01.06 + +### Changed +- Update output example in README ([#3512](https://github.com/cookiecutter/cookiecutter-django/pull/3512)) + +## 2022.01.05 + +### Changed +- Update references to Bootstrap from v4 to v5 in README ([#3513](https://github.com/cookiecutter/cookiecutter-django/pull/3513)) +### Updated +- Update requests to 2.27.1 ([#3516](https://github.com/cookiecutter/cookiecutter-django/pull/3516)) + +## 2022.01.04 + +### Changed +- Double quote array expansions to avoid re-splitting elements ([#3514](https://github.com/cookiecutter/cookiecutter-django/pull/3514)) +### Updated +- Update django to 3.2.11 ([#3510](https://github.com/cookiecutter/cookiecutter-django/pull/3510)) + +## 2022.01.03 + +### Changed +- Convert top level RST files to Markdown ([#3489](https://github.com/cookiecutter/cookiecutter-django/pull/3489)) +### Updated +- Update requests to 2.27.0 ([#3509](https://github.com/cookiecutter/cookiecutter-django/pull/3509)) +- Update pillow to 9.0.0 ([#3508](https://github.com/cookiecutter/cookiecutter-django/pull/3508)) +- Update pylint-django to 2.5.0 ([#3505](https://github.com/cookiecutter/cookiecutter-django/pull/3505)) + +## 2021.12.29 + +### Fixed +- Add generated files to `.gitignore` when selecting Gulp ([#3500](https://github.com/cookiecutter/cookiecutter-django/pull/3500)) +### Updated +- Update psycopg2-binary to 2.9.3 ([#3504](https://github.com/cookiecutter/cookiecutter-django/pull/3504)) +- Update psycopg2 to 2.9.3 ([#3503](https://github.com/cookiecutter/cookiecutter-django/pull/3503)) +- Update celery to 5.2.3 ([#3502](https://github.com/cookiecutter/cookiecutter-django/pull/3502)) +- Update tox to 3.24.5 ([#3501](https://github.com/cookiecutter/cookiecutter-django/pull/3501)) + +## 2021.12.28 + +### Changed +- Build the HTML for the documentation as part of the CI ([#3498](https://github.com/cookiecutter/cookiecutter-django/pull/3498)) + +## 2021.12.27 + +### Changed +- Hides 'sign up' elements when ACCOUNT_ALLOW_REGISTRATION is disabled ([#1914](https://github.com/cookiecutter/cookiecutter-django/pull/1914)) + +## 2021.12.26 + +### Fixed +- Fix missing psycopg2 dependency in docs Docker image ([#3494](https://github.com/cookiecutter/cookiecutter-django/pull/3494)) +### Updated +- Update celery to 5.2.2 ([#3496](https://github.com/cookiecutter/cookiecutter-django/pull/3496)) +- Update redis to 4.1.0 ([#3495](https://github.com/cookiecutter/cookiecutter-django/pull/3495)) + +## 2021.12.25 + +### Changed +- Automatically add Django version label to issue ([#3492](https://github.com/cookiecutter/cookiecutter-django/pull/3492)) +### Updated +- Auto-update pre-commit hooks ([#3493](https://github.com/cookiecutter/cookiecutter-django/pull/3493)) + +## 2021.12.24 + +### Changed +- Simplify `TEMPLATES` settings with `APP_DIRS=True` ([#3488](https://github.com/cookiecutter/cookiecutter-django/pull/3488)) +- Fix docs not building ([#3491](https://github.com/cookiecutter/cookiecutter-django/pull/3491)) +- Remove pylint-django from VITAL_BUT_UNKNOWN ([#3490](https://github.com/cookiecutter/cookiecutter-django/pull/3490)) +- Making docs image 40% smaller and also making python version upgrades easier for multi-stage builds. ([#2836](https://github.com/cookiecutter/cookiecutter-django/pull/2836)) +- Added Django's current language to the lang attribute of the html tag ([#3174](https://github.com/cookiecutter/cookiecutter-django/pull/3174)) +### Updated +- Update uvicorn to 0.16.0 ([#3454](https://github.com/cookiecutter/cookiecutter-django/pull/3454)) + +## 2021.12.22 + +### Changed +- Use built-in pip caching from actions/setup-python in generated project ([#3481](https://github.com/cookiecutter/cookiecutter-django/pull/3481)) +- Speed up CI tests on macOS ([#3480](https://github.com/cookiecutter/cookiecutter-django/pull/3480)) +### Updated +- Update mypy to 0.930 ([#3487](https://github.com/cookiecutter/cookiecutter-django/pull/3487)) +- Update redis to 4.0.2 ([#3486](https://github.com/cookiecutter/cookiecutter-django/pull/3486)) +- Update django-redis to 5.2.0 ([#3485](https://github.com/cookiecutter/cookiecutter-django/pull/3485)) + +## 2021.12.20 + +### Changed +- Add a PyCharm run configuration for docker-compose ([#3462](https://github.com/cookiecutter/cookiecutter-django/pull/3462)) + +## 2021.12.19 + +### Updated +- Update mypy to 0.920 ([#3478](https://github.com/cookiecutter/cookiecutter-django/pull/3478)) +- Update django-compressor to 3.1 ([#3476](https://github.com/cookiecutter/cookiecutter-django/pull/3476)) +- Update sphinx to 4.3.2 ([#3477](https://github.com/cookiecutter/cookiecutter-django/pull/3477)) + +## 2021.12.17 + +### Fixed +- Fix BrowserSync config on non-Docker setup ([#3461](https://github.com/cookiecutter/cookiecutter-django/pull/3461)) + +## 2021.12.16 + +### Fixed +- Fix carriage return in `.gitignore` on Windows ([#3456](https://github.com/cookiecutter/cookiecutter-django/pull/3456)) +### Updated +- Update django-debug-toolbar to 3.2.4 ([#3473](https://github.com/cookiecutter/cookiecutter-django/pull/3473)) + +## 2021.12.15 + +### Updated +- Update djangorestframework to 3.13.1 ([#3472](https://github.com/cookiecutter/cookiecutter-django/pull/3472)) + +## 2021.12.14 + +### Changed +- Update rcssmin & django-compressor ([#3470](https://github.com/cookiecutter/cookiecutter-django/pull/3470)) +### Updated +- Update pytest-django to 4.5.2 ([#3471](https://github.com/cookiecutter/cookiecutter-django/pull/3471)) +- Bump peter-evans/create-pull-request from 3.11.0 to 3.12.0 ([#3469](https://github.com/cookiecutter/cookiecutter-django/pull/3469)) + +## 2021.12.13 + +### Updated +- Update djangorestframework to 3.13.0 ([#3468](https://github.com/cookiecutter/cookiecutter-django/pull/3468)) +- Update sentry-sdk to 1.5.1 ([#3467](https://github.com/cookiecutter/cookiecutter-django/pull/3467)) +- Update django-debug-toolbar to 3.2.3 ([#3466](https://github.com/cookiecutter/cookiecutter-django/pull/3466)) +- Update argon2-cffi to 21.3.0 ([#3464](https://github.com/cookiecutter/cookiecutter-django/pull/3464)) +- Update django-allauth to 0.47.0 ([#3459](https://github.com/cookiecutter/cookiecutter-django/pull/3459)) + +## 2021.12.09 + +### Updated +- Auto-update pre-commit hooks ([#3457](https://github.com/cookiecutter/cookiecutter-django/pull/3457)) + +## 2021.12.08 + +### Changed +- Reword introduction in documentation ([#3452](https://github.com/cookiecutter/cookiecutter-django/pull/3452)) +### Updated +- Update argon2-cffi to 21.2.0 ([#3453](https://github.com/cookiecutter/cookiecutter-django/pull/3453)) + +## 2021.12.07 + +### Changed +- Add docker, pip and npm to GitHub's Dependabot ([#3401](https://github.com/cookiecutter/cookiecutter-django/pull/3401)) +- Configure Dependabot for npm packages at the template level ([#3436](https://github.com/cookiecutter/cookiecutter-django/pull/3436)) +### Updated +- Update django to 3.2.10 ([#3451](https://github.com/cookiecutter/cookiecutter-django/pull/3451)) + +## 2021.12.06 + +### Updated +- Auto-update pre-commit hooks ([#3449](https://github.com/cookiecutter/cookiecutter-django/pull/3449)) +- Update black to 21.12b0 ([#3448](https://github.com/cookiecutter/cookiecutter-django/pull/3448)) +- Update django-cors-headers to 3.10.1 ([#3447](https://github.com/cookiecutter/cookiecutter-django/pull/3447)) + +## 2021.12.04 + +### Changed +- Removed mention of Foundation fork from readme ([#3445](https://github.com/cookiecutter/cookiecutter-django/pull/3445)) +### Updated +- Update pytest-django to 4.5.1 ([#3443](https://github.com/cookiecutter/cookiecutter-django/pull/3443)) + +## 2021.12.01 + +### Updated +- Update pre-commit to 2.16.0 ([#3442](https://github.com/cookiecutter/cookiecutter-django/pull/3442)) + +## 2021.11.30 + +### Updated +- Update django-redis to 5.1.0 ([#3440](https://github.com/cookiecutter/cookiecutter-django/pull/3440)) +- Update django-stubs to 1.9.0 ([#3439](https://github.com/cookiecutter/cookiecutter-django/pull/3439)) + +## 2021.11.29 + +### Fixed +- Fix pre-commit config ([#3435](https://github.com/cookiecutter/cookiecutter-django/pull/3435)) +### Updated +- Update sphinx to 4.3.1 ([#3438](https://github.com/cookiecutter/cookiecutter-django/pull/3438)) + +## 2021.11.27 + +### Updated +- Update coverage to 6.2 ([#3437](https://github.com/cookiecutter/cookiecutter-django/pull/3437)) + +## 2021.11.26 + +### Changed +- Setup pre-commit for the template files ([#3433](https://github.com/cookiecutter/cookiecutter-django/pull/3433)) + +## 2021.11.25 + +### Changed +- Add an assertion to fix mypy type error ([#3150](https://github.com/cookiecutter/cookiecutter-django/pull/3150)) +- Make `django` depend on `redis` in local Docker ([#3265](https://github.com/cookiecutter/cookiecutter-django/pull/3265)) + +## 2021.11.24 + +### Changed +- Cache Python dependencies on our CI ([#3434](https://github.com/cookiecutter/cookiecutter-django/pull/3434)) +- Small formatting fixes to Deploy to PythonAnywhere page ([#3432](https://github.com/cookiecutter/cookiecutter-django/pull/3432)) +### Updated +- Upgrade to Django 3.2 ([#3425](https://github.com/cookiecutter/cookiecutter-django/pull/3425)) + +## 2021.11.22 + +### Changed +- Removed unnecessary custom context processor exposing the DEBUG Template Context Variable ([#3042](https://github.com/cookiecutter/cookiecutter-django/pull/3042)) +- Clean up trailing whitespace ([#3430](https://github.com/cookiecutter/cookiecutter-django/pull/3430)) +### Updated +- Update redis to 4.0.2 ([#3431](https://github.com/cookiecutter/cookiecutter-django/pull/3431)) +- Bump Postgres to 13.5 12.9 11.14 10.19; add 14.1 ([#3428](https://github.com/cookiecutter/cookiecutter-django/pull/3428)) + +## 2021.11.20 + +### Fixed +- Update repos for pre-commit hooks ([#3424](https://github.com/cookiecutter/cookiecutter-django/pull/3424)) +### Updated +- Bump pre-commit/action to 2.0.3 ([#3426](https://github.com/cookiecutter/cookiecutter-django/pull/3426)) + +## 2021.11.19 + +### Updated +- Update celery to 5.2.1 ([#3423](https://github.com/cookiecutter/cookiecutter-django/pull/3423)) +- Auto-update pre-commit hooks ([#3420](https://github.com/cookiecutter/cookiecutter-django/pull/3420)) + +## 2021.11.18 + +### Changed +- Switch template to calendar versioning & automate releases ([#3415](https://github.com/cookiecutter/cookiecutter-django/pull/3415)) +### Updated +- Update black to 21.11b1 ([#3421](https://github.com/cookiecutter/cookiecutter-django/pull/3421)) +- Update redis to 4.0.1 ([#3416](https://github.com/cookiecutter/cookiecutter-django/pull/3416)) + +## [2021-11-17] +### Updated +- Update sentry-sdk to 1.5.0 ([#3417](https://github.com/cookiecutter/cookiecutter-django/pull/3417)) +- Update black to 21.11b0 ([#3414](https://github.com/cookiecutter/cookiecutter-django/pull/3414)) + +## [2021-11-16] +### Changed +- Upgrade JS dependencies and upgrade to node 16 ([#3400](https://github.com/cookiecutter/cookiecutter-django/pull/3400)) +### Fixed +- Fix ungraceful Celery workers shutdown in container ([#3405](https://github.com/cookiecutter/cookiecutter-django/pull/3405)) +### Updated +- Update psycopg2-binary to 2.9.2 ([#3411](https://github.com/cookiecutter/cookiecutter-django/pull/3411)) +- Update psycopg2 to 2.9.2 ([#3410](https://github.com/cookiecutter/cookiecutter-django/pull/3410)) +- Update redis to 4.0.0 ([#3406](https://github.com/cookiecutter/cookiecutter-django/pull/3406)) +- Update django-coverage-plugin to 2.0.2 ([#3409](https://github.com/cookiecutter/cookiecutter-django/pull/3409)) +- Update black to 21.10b0 ([#3408](https://github.com/cookiecutter/cookiecutter-django/pull/3408)) + +## [2021-11-15] +### Updated +- Update django-allauth to 0.46.0 ([#3407](https://github.com/cookiecutter/cookiecutter-django/pull/3407)) + +## [2021-11-13] +### Fixed +- Fix incorrect node version in `package.json` ([#3399](https://github.com/cookiecutter/cookiecutter-django/pull/3399)) + +## [2021-11-12] +### Changed +- Add Django major/minor release table maker in GitHub issues ([#3288](https://github.com/cookiecutter/cookiecutter-django/pull/3288)) +- Upgrade to Bootstrap 5 ([#3276](https://github.com/cookiecutter/cookiecutter-django/pull/3276)) +### Updated +- Update requests to 2.26.0 ([#3397](https://github.com/cookiecutter/cookiecutter-django/pull/3397)) +- Update crispy-bootstrap5 to 0.6 ([#3396](https://github.com/cookiecutter/cookiecutter-django/pull/3396)) + +## [2021-11-11] +### Changed +- Build all images on CI ([#3394](https://github.com/cookiecutter/cookiecutter-django/pull/3394)) +### Updated +- Update coverage to 6.1.2 ([#3393](https://github.com/cookiecutter/cookiecutter-django/pull/3393)) + +## [2021-11-10] +### Changed +- Update sphinx to 4.3.0 ([#3392](https://github.com/cookiecutter/cookiecutter-django/pull/3392)) +### Updated +- Auto-update pre-commit hooks ([#3389](https://github.com/cookiecutter/cookiecutter-django/pull/3389)) +- Update jinja2 to 3.0.3 ([#3388](https://github.com/cookiecutter/cookiecutter-django/pull/3388)) + +## [2021-11-09] +### Changed +- refactor: remove user API methods parameter ([#3385](https://github.com/cookiecutter/cookiecutter-django/pull/3385)) +- Get GitHub repo from environment ([#3387](https://github.com/cookiecutter/cookiecutter-django/pull/3387)) +### Updated +- Update celery to 5.2.0 ([#3384](https://github.com/cookiecutter/cookiecutter-django/pull/3384)) +- Update isort to 5.10.1 ([#3386](https://github.com/cookiecutter/cookiecutter-django/pull/3386)) + +## [2021-11-08] +### Changed +- Update docker and non-docker configs to Debian 11 (bullseye) ([#3372](https://github.com/cookiecutter/cookiecutter-django/pull/3372)) + +## [2021-11-07] +### Updated +- Update django-extensions to 3.1.5 ([#3383](https://github.com/cookiecutter/cookiecutter-django/pull/3383)) + +## [2021-11-04] +### Changed +- change path in docs Makefile to use APP variable ([#3379](https://github.com/cookiecutter/cookiecutter-django/pull/3379)) +### Fixed +- fix help in docs Makefile ([#3380](https://github.com/cookiecutter/cookiecutter-django/pull/3380)) +### Updated +- Bump peter-evans/create-pull-request from 3.10.1 to 3.11.0 ([#3382](https://github.com/cookiecutter/cookiecutter-django/pull/3382)) +- Auto-update pre-commit hooks ([#3381](https://github.com/cookiecutter/cookiecutter-django/pull/3381)) +- Update isort to 5.10.0 ([#3378](https://github.com/cookiecutter/cookiecutter-django/pull/3378)) + +## [2021-11-02] +### Updated +- Auto-update pre-commit hooks ([#3377](https://github.com/cookiecutter/cookiecutter-django/pull/3377)) + +## [2021-11-01] +### Updated +- Update django-storages to 1.12.3 ([#3374](https://github.com/cookiecutter/cookiecutter-django/pull/3374)) +- Update coverage to 6.1.1 ([#3376](https://github.com/cookiecutter/cookiecutter-django/pull/3376)) + +## [2021-10-28] +### Updated +- Update factory-boy to 3.2.1 ([#3373](https://github.com/cookiecutter/cookiecutter-django/pull/3373)) + +## [2021-10-26] +### Changed +- use Wayback Machine to fix dead link for postgres user setup ([#3363](https://github.com/cookiecutter/cookiecutter-django/pull/3363)) +- Fix pull request links to correct repo URL on CHANGELOG.md ([#3370](https://github.com/cookiecutter/cookiecutter-django/pull/3370)) +### Updated +- Update pyyaml to 6.0 ([#3362](https://github.com/cookiecutter/cookiecutter-django/pull/3362)) +- Update pillow to 8.4.0 ([#3364](https://github.com/cookiecutter/cookiecutter-django/pull/3364)) +- Update django-storages to 1.12.2 ([#3365](https://github.com/cookiecutter/cookiecutter-django/pull/3365)) +- Update django-environ to 0.8.1 ([#3368](https://github.com/cookiecutter/cookiecutter-django/pull/3368)) + +## [2021-10-22] +### Changed +- Move repo under cookiecutter organisation ([#3357](https://github.com/cookiecutter/cookiecutter-django/pull/3357)) + +## [2021-10-18] +### Updated +- Update django-environ to 0.8.0 ([#3367](https://github.com/cookiecutter/cookiecutter-django/pull/3367)) + +## [2021-10-14] +### Updated +- Update flake8 to 4.0.1 ([#3361](https://github.com/cookiecutter/cookiecutter-django/pull/3361)) +- Update flake8-isort to 4.1.1 ([#3360](https://github.com/cookiecutter/cookiecutter-django/pull/3360)) +- Update django-model-utils to 4.2.0 ([#3359](https://github.com/cookiecutter/cookiecutter-django/pull/3359)) + +## [2021-10-13] +### Changed +- Add drf stubs ([#3353](https://github.com/cookiecutter/cookiecutter-django/pull/3353)) + +## [2021-10-12] +### Updated +- Update coverage to 6.0.2 ([#3356](https://github.com/cookiecutter/cookiecutter-django/pull/3356)) + +## [2021-10-11] +### Updated +- Update werkzeug to 2.0.2 ([#3344](https://github.com/cookiecutter/cookiecutter-django/pull/3344)) +- Update coverage to 6.0.1 ([#3348](https://github.com/cookiecutter/cookiecutter-django/pull/3348)) +- Update django-coverage-plugin to 2.0.1 ([#3349](https://github.com/cookiecutter/cookiecutter-django/pull/3349)) +- Update django-cors-headers to 3.10.0 ([#3345](https://github.com/cookiecutter/cookiecutter-django/pull/3345)) +- Update jinja2 to 3.0.2 ([#3343](https://github.com/cookiecutter/cookiecutter-django/pull/3343)) +- Update django-storages to 1.12.1 ([#3355](https://github.com/cookiecutter/cookiecutter-django/pull/3355)) + +## [2021-10-03] +### Updated +- Update pytz to 2021.3 ([#3340](https://github.com/cookiecutter/cookiecutter-django/pull/3340)) + +## [2021-10-01] +### Changed +- Fix the wrong pre-commit hyperlink in Prerequisites section ([#3338](https://github.com/cookiecutter/cookiecutter-django/pull/3338)) + +## [2021-09-30] +### Updated +- Update sentry-sdk to 1.4.3 ([#3334](https://github.com/cookiecutter/cookiecutter-django/pull/3334)) + +## [2021-09-29] +### Updated +- Update django-cors-headers to 3.9.0 ([#3332](https://github.com/cookiecutter/cookiecutter-django/pull/3332)) + +## [2021-09-27] +### Updated +- Update sentry-sdk to 1.4.2 ([#3329](https://github.com/cookiecutter/cookiecutter-django/pull/3329)) + +## [2021-09-26] +### Updated +- Update django-crispy-forms to 1.13.0 ([#3327](https://github.com/cookiecutter/cookiecutter-django/pull/3327)) + +## [2021-09-24] +### Changed +- Add django-settings-module to .pylintrc ([#3326](https://github.com/cookiecutter/cookiecutter-django/pull/3326)) + +## [2021-09-23] +### Updated +- Update sentry-sdk to 1.4.1 ([#3325](https://github.com/cookiecutter/cookiecutter-django/pull/3325)) + +## [2021-09-22] +### Updated +- Update sentry-sdk to 1.4.0 ([#3324](https://github.com/cookiecutter/cookiecutter-django/pull/3324)) + +## [2021-09-16] +### Updated +- Update tox to 3.24.4 ([#3323](https://github.com/cookiecutter/cookiecutter-django/pull/3323)) + +## [2021-09-15] +### Updated +- Auto-update pre-commit hooks ([#3322](https://github.com/cookiecutter/cookiecutter-django/pull/3322)) + +## [2021-09-14] +### Updated +- Update black to 21.9b0 ([#3321](https://github.com/cookiecutter/cookiecutter-django/pull/3321)) + +## [2021-09-13] +### Updated +- Bump stefanzweifel/git-auto-commit-action from 4.11.0 to 4.12.0 ([#3320](https://github.com/cookiecutter/cookiecutter-django/pull/3320)) +- Update sphinx to 4.2.0 ([#3319](https://github.com/cookiecutter/cookiecutter-django/pull/3319)) + +## [2021-09-11] +### Changed +- Removing pycharm docs if app does not use pycharm ([#3139](https://github.com/cookiecutter/cookiecutter-django/pull/3139)) +### Updated +- Update django-environ to 0.7.0 ([#3317](https://github.com/cookiecutter/cookiecutter-django/pull/3317)) + +## [2021-09-06] +### Changed +- Update Celery to v5 ([#3280](https://github.com/cookiecutter/cookiecutter-django/pull/3280)) + +## [2021-09-05] +### Updated +- Update django-environ to 0.6.0 ([#3314](https://github.com/cookiecutter/cookiecutter-django/pull/3314)) + +## [2021-09-03] +### Changed +- Update available postgres versions ([#3297](https://github.com/cookiecutter/cookiecutter-django/pull/3297)) +### Updated +- Update pre-commit to 2.15.0 ([#3313](https://github.com/cookiecutter/cookiecutter-django/pull/3313)) +- Auto-update pre-commit hooks ([#3307](https://github.com/cookiecutter/cookiecutter-django/pull/3307)) +- Update pillow to 8.3.2 ([#3312](https://github.com/cookiecutter/cookiecutter-django/pull/3312)) +- Update django-environ to 0.5.0 ([#3311](https://github.com/cookiecutter/cookiecutter-django/pull/3311)) +- Update pytest to 6.2.5 ([#3310](https://github.com/cookiecutter/cookiecutter-django/pull/3310)) +- Update black to 21.8b0 ([#3308](https://github.com/cookiecutter/cookiecutter-django/pull/3308)) +- Update argon2-cffi to 21.1.0 ([#3306](https://github.com/cookiecutter/cookiecutter-django/pull/3306)) +- Bump peter-evans/create-pull-request from 3.10.0 to 3.10.1 ([#3303](https://github.com/cookiecutter/cookiecutter-django/pull/3303)) +- Update django-debug-toolbar to 3.2.2 ([#3296](https://github.com/cookiecutter/cookiecutter-django/pull/3296)) +- Update django-cors-headers to 3.8.0 ([#3295](https://github.com/cookiecutter/cookiecutter-django/pull/3295)) +- Update uvicorn to 0.15.0 ([#3294](https://github.com/cookiecutter/cookiecutter-django/pull/3294)) + +## [2021-08-27] +### Updated +- Update tox to 3.24.3 ([#3302](https://github.com/cookiecutter/cookiecutter-django/pull/3302)) + +## [2021-08-20] +### Changed +- Fix Jinja2 break line control on Procfile ([#3300](https://github.com/cookiecutter/cookiecutter-django/pull/3300)) + +## [2021-08-19] +### Changed +- Fix several minor typos ([#3301](https://github.com/cookiecutter/cookiecutter-django/pull/3301)) + ## [2021-08-13] ### Changed -- Upgrade to Redis 6 ([#3255](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3255)) +- Upgrade to Redis 6 ([#3255](https://github.com/cookiecutter/cookiecutter-django/pull/3255)) ### Fixed -- Fix RTD build image to support Python 3.9 ([#3293](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3293)) +- Fix RTD build image to support Python 3.9 ([#3293](https://github.com/cookiecutter/cookiecutter-django/pull/3293)) ## [2021-08-12] ### Changed -- Add documentation for automating backups ([#3268](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3268)) -- Add missing step to getting started locally in docs ([#3291](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3291)) -- Moved isort config from `.editorconfig` to `setup.cfg` ([#3290](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3290)) -- How to pre-commit in Docker Development ([#3287](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3287)) +- Add documentation for automating backups ([#3268](https://github.com/cookiecutter/cookiecutter-django/pull/3268)) +- Add missing step to getting started locally in docs ([#3291](https://github.com/cookiecutter/cookiecutter-django/pull/3291)) +- Moved isort config from `.editorconfig` to `setup.cfg` ([#3290](https://github.com/cookiecutter/cookiecutter-django/pull/3290)) +- How to pre-commit in Docker Development ([#3287](https://github.com/cookiecutter/cookiecutter-django/pull/3287)) ### Updated -- Update sentry-sdk to 1.3.1 ([#3281](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3281)) -- Update tox to 3.24.1 ([#3285](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3285)) -- Update pre-commit to 2.14.0 ([#3289](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3289)) +- Update sentry-sdk to 1.3.1 ([#3281](https://github.com/cookiecutter/cookiecutter-django/pull/3281)) +- Update tox to 3.24.1 ([#3285](https://github.com/cookiecutter/cookiecutter-django/pull/3285)) +- Update pre-commit to 2.14.0 ([#3289](https://github.com/cookiecutter/cookiecutter-django/pull/3289)) ## [2021-07-30] ### Updated -- Auto-update pre-commit hooks ([#3283](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3283)) -- Update isort to 5.9.3 ([#3282](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3282)) +- Auto-update pre-commit hooks ([#3283](https://github.com/cookiecutter/cookiecutter-django/pull/3283)) +- Update isort to 5.9.3 ([#3282](https://github.com/cookiecutter/cookiecutter-django/pull/3282)) ## [2021-07-27] ### Changed -- Convert trans to translate in templates ([#3277](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3277)) +- Convert trans to translate in templates ([#3277](https://github.com/cookiecutter/cookiecutter-django/pull/3277)) ### Updated -- Update hiredis to 2.0.0 ([#3110](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3110)) -- Update mypy to 0.910 ([#3237](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3237)) -- Update whitenoise to 5.3.0 ([#3273](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3273)) -- Update tox to 3.24.0 ([#3269](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3269)) -- Update django-allauth to 0.45.0 ([#3267](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3267)) -- Update sentry-sdk to 1.3.0 ([#3262](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3262)) -- Update sphinx to 4.1.2 ([#3278](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3278)) -- Auto-update pre-commit hooks ([#3264](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3264)) -- Update isort to 5.9.2 ([#3279](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3279)) -- Update pillow to 8.3.1 ([#3259](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3259)) -- Update black to 21.7b0 ([#3272](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3272)) +- Update hiredis to 2.0.0 ([#3110](https://github.com/cookiecutter/cookiecutter-django/pull/3110)) +- Update mypy to 0.910 ([#3237](https://github.com/cookiecutter/cookiecutter-django/pull/3237)) +- Update whitenoise to 5.3.0 ([#3273](https://github.com/cookiecutter/cookiecutter-django/pull/3273)) +- Update tox to 3.24.0 ([#3269](https://github.com/cookiecutter/cookiecutter-django/pull/3269)) +- Update django-allauth to 0.45.0 ([#3267](https://github.com/cookiecutter/cookiecutter-django/pull/3267)) +- Update sentry-sdk to 1.3.0 ([#3262](https://github.com/cookiecutter/cookiecutter-django/pull/3262)) +- Update sphinx to 4.1.2 ([#3278](https://github.com/cookiecutter/cookiecutter-django/pull/3278)) +- Auto-update pre-commit hooks ([#3264](https://github.com/cookiecutter/cookiecutter-django/pull/3264)) +- Update isort to 5.9.2 ([#3279](https://github.com/cookiecutter/cookiecutter-django/pull/3279)) +- Update pillow to 8.3.1 ([#3259](https://github.com/cookiecutter/cookiecutter-django/pull/3259)) +- Update black to 21.7b0 ([#3272](https://github.com/cookiecutter/cookiecutter-django/pull/3272)) ## [2021-07-12] ### Changed -- Define REMAP_SIGTERM=SIGQUIT on Profile of Celery on Heroku ([#3263](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3263)) +- Define REMAP_SIGTERM=SIGQUIT on Profile of Celery on Heroku ([#3263](https://github.com/cookiecutter/cookiecutter-django/pull/3263)) ## [2021-07-08] ### Updated -- Update django to 3.1.13 ([#3247](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3247)) +- Update django to 3.1.13 ([#3247](https://github.com/cookiecutter/cookiecutter-django/pull/3247)) ## [2021-06-29] ### Changed -- Improve github bug report template ([#3243](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3243)) +- Improve github bug report template ([#3243](https://github.com/cookiecutter/cookiecutter-django/pull/3243)) ## [2021-06-28] ### Changed -- Revert "Fix Celery ports error on local Docker" ([#3242](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3242)) +- Revert "Fix Celery ports error on local Docker" ([#3242](https://github.com/cookiecutter/cookiecutter-django/pull/3242)) ### Fixed -- Fix Celery ports error on local Docker ([#3241](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3241)) +- Fix Celery ports error on local Docker ([#3241](https://github.com/cookiecutter/cookiecutter-django/pull/3241)) ## [2021-06-25] ### Changed -- Update `.gitignore` file for VSCode ([#3238](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3238)) +- Update `.gitignore` file for VSCode ([#3238](https://github.com/cookiecutter/cookiecutter-django/pull/3238)) ### Fixed -- Wrap jQuery call in `DOMContentLoaded` event listener on account email page ([#3239](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3239)) +- Wrap jQuery call in `DOMContentLoaded` event listener on account email page ([#3239](https://github.com/cookiecutter/cookiecutter-django/pull/3239)) ## [2021-06-22] ### Changed -- Update docs/howto.rst ([#3230](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3230)) -- Add support for PG 13. Drop PG 9. Update all minor versions ([#3154](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3154)) +- Update docs/howto.rst ([#3230](https://github.com/cookiecutter/cookiecutter-django/pull/3230)) +- Add support for PG 13. Drop PG 9. Update all minor versions ([#3154](https://github.com/cookiecutter/cookiecutter-django/pull/3154)) ### Updated -- Update isort to 5.9.1 ([#3236](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3236)) -- Auto-update pre-commit hooks ([#3235](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3235)) +- Update isort to 5.9.1 ([#3236](https://github.com/cookiecutter/cookiecutter-django/pull/3236)) +- Auto-update pre-commit hooks ([#3235](https://github.com/cookiecutter/cookiecutter-django/pull/3235)) ## [2021-06-21] ### Updated -- Update isort to 5.9.0 ([#3234](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3234)) -- Update django-anymail to 8.4 ([#3225](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3225)) -- Update django-redis to 5.0.0 ([#3205](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3205)) -- Update pylint-django to 2.4.4 ([#3233](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3233)) -- Auto-update pre-commit hooks ([#3220](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3220)) -- Bump peter-evans/create-pull-request from 3.9.2 to 3.10.0 ([#3197](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3197)) -- Update black to 21.6b0 ([#3232](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3232)) -- Update pytest to 6.2.4 ([#3231](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3231)) -- Update django-crispy-forms to 1.12.0 ([#3221](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3221)) -- Update mypy to 0.902 ([#3219](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3219)) -- Update django-coverage-plugin to 2.0.0 ([#3217](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3217)) -- Update ipdb to 0.13.9 ([#3210](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3210)) -- Update uvicorn to 0.14.0 ([#3207](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3207)) -- Update pytest-cookies to 0.6.1 ([#3196](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3196)) -- Update sphinx to 4.0.2 ([#3193](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3193)) -- Update jinja2 to 3.0.1 ([#3189](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3189)) +- Update isort to 5.9.0 ([#3234](https://github.com/cookiecutter/cookiecutter-django/pull/3234)) +- Update django-anymail to 8.4 ([#3225](https://github.com/cookiecutter/cookiecutter-django/pull/3225)) +- Update django-redis to 5.0.0 ([#3205](https://github.com/cookiecutter/cookiecutter-django/pull/3205)) +- Update pylint-django to 2.4.4 ([#3233](https://github.com/cookiecutter/cookiecutter-django/pull/3233)) +- Auto-update pre-commit hooks ([#3220](https://github.com/cookiecutter/cookiecutter-django/pull/3220)) +- Bump peter-evans/create-pull-request from 3.9.2 to 3.10.0 ([#3197](https://github.com/cookiecutter/cookiecutter-django/pull/3197)) +- Update black to 21.6b0 ([#3232](https://github.com/cookiecutter/cookiecutter-django/pull/3232)) +- Update pytest to 6.2.4 ([#3231](https://github.com/cookiecutter/cookiecutter-django/pull/3231)) +- Update django-crispy-forms to 1.12.0 ([#3221](https://github.com/cookiecutter/cookiecutter-django/pull/3221)) +- Update mypy to 0.902 ([#3219](https://github.com/cookiecutter/cookiecutter-django/pull/3219)) +- Update django-coverage-plugin to 2.0.0 ([#3217](https://github.com/cookiecutter/cookiecutter-django/pull/3217)) +- Update ipdb to 0.13.9 ([#3210](https://github.com/cookiecutter/cookiecutter-django/pull/3210)) +- Update uvicorn to 0.14.0 ([#3207](https://github.com/cookiecutter/cookiecutter-django/pull/3207)) +- Update pytest-cookies to 0.6.1 ([#3196](https://github.com/cookiecutter/cookiecutter-django/pull/3196)) +- Update sphinx to 4.0.2 ([#3193](https://github.com/cookiecutter/cookiecutter-django/pull/3193)) +- Update jinja2 to 3.0.1 ([#3189](https://github.com/cookiecutter/cookiecutter-django/pull/3189)) ## [2021-06-19] ### Updated -- Update psycopg2 to 2.9.1 ([#3227](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3227)) -- Update psycopg2-binary to 2.9.1 ([#3228](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3228)) +- Update psycopg2 to 2.9.1 ([#3227](https://github.com/cookiecutter/cookiecutter-django/pull/3227)) +- Update psycopg2-binary to 2.9.1 ([#3228](https://github.com/cookiecutter/cookiecutter-django/pull/3228)) ## [2021-06-14] ### Changed -- Update black GitHub link in requirements ([#3222](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3222)) +- Update black GitHub link in requirements ([#3222](https://github.com/cookiecutter/cookiecutter-django/pull/3222)) ## [2021-06-09] ### Changed -- Fix link format in developing-locally.rst ([#3214](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3214)) +- Fix link format in developing-locally.rst ([#3214](https://github.com/cookiecutter/cookiecutter-django/pull/3214)) ### Updated -- Update pre-commit to 2.13.0 ([#3195](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3195)) -- Update pytest-django to 4.4.0 ([#3212](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3212)) -- Update mypy to 0.901 ([#3215](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3215)) -- Auto-update pre-commit hooks ([#3206](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3206)) -- Update black to 21.5b2 ([#3204](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3204)) +- Update pre-commit to 2.13.0 ([#3195](https://github.com/cookiecutter/cookiecutter-django/pull/3195)) +- Update pytest-django to 4.4.0 ([#3212](https://github.com/cookiecutter/cookiecutter-django/pull/3212)) +- Update mypy to 0.901 ([#3215](https://github.com/cookiecutter/cookiecutter-django/pull/3215)) +- Auto-update pre-commit hooks ([#3206](https://github.com/cookiecutter/cookiecutter-django/pull/3206)) +- Update black to 21.5b2 ([#3204](https://github.com/cookiecutter/cookiecutter-django/pull/3204)) ## [2021-06-06] ### Changed -- Updated .pre-commit-config.yaml to self-update its dependencies ([#3208](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3208)) +- Updated .pre-commit-config.yaml to self-update its dependencies ([#3208](https://github.com/cookiecutter/cookiecutter-django/pull/3208)) ## [2021-06-05] ### Changed -- Shorthand for the officially supported buildpack ([#3211](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3211)) +- Shorthand for the officially supported buildpack ([#3211](https://github.com/cookiecutter/cookiecutter-django/pull/3211)) ## [2021-06-02] ### Updated -- Update django to 3.1.12 ([#3209](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3209)) +- Update django to 3.1.12 ([#3209](https://github.com/cookiecutter/cookiecutter-django/pull/3209)) ## [2021-05-18] ### Changed -- Move ARG PYTHON_VERSION=3.9-slim-buster to the global scope ([#3188](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3188)) +- Move ARG PYTHON_VERSION=3.9-slim-buster to the global scope ([#3188](https://github.com/cookiecutter/cookiecutter-django/pull/3188)) ## [2021-05-17] ### Updated -- Bump tiangolo/issue-manager from 0.3.0 to 0.4.0 ([#3186](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3186)) -- Auto-update pre-commit hooks ([#3185](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3185)) +- Bump tiangolo/issue-manager from 0.3.0 to 0.4.0 ([#3186](https://github.com/cookiecutter/cookiecutter-django/pull/3186)) +- Auto-update pre-commit hooks ([#3185](https://github.com/cookiecutter/cookiecutter-django/pull/3185)) ## [2021-05-15] ### Changed -- Update watchgod to 0.7 ([#3177](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3177)) +- Update watchgod to 0.7 ([#3177](https://github.com/cookiecutter/cookiecutter-django/pull/3177)) ### Updated -- Auto-update pre-commit hooks ([#3184](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3184)) -- Update black to 21.5b1 ([#3167](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3167)) -- Update flake8 to 3.9.2 ([#3164](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3164)) -- Update pytest-django to 4.3.0 ([#3182](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3182)) -- Auto-update pre-commit hooks ([#3157](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3157)) -- Update python-slugify to 5.0.2 ([#3161](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3161)) -- Bump stefanzweifel/git-auto-commit-action from 4.10.0 to 4.11.0 ([#3171](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3171)) -- Update sentry-sdk to 1.1.0 ([#3163](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3163)) -- Bump actions/setup-python from 2 to 2.2.2 ([#3173](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3173)) -- Update tox to 3.23.1 ([#3160](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3160)) -- Update pytest to 6.2.4 ([#3156](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3156)) -- Bump peter-evans/create-pull-request from 3.8.2 to 3.9.2 ([#3179](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3179)) -- Update sphinx to 4.0.1 ([#3169](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3169)) -- Update cookiecutter to 1.7.3 ([#3180](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3180)) -- Update django to 3.1.11 ([#3178](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3178)) +- Auto-update pre-commit hooks ([#3184](https://github.com/cookiecutter/cookiecutter-django/pull/3184)) +- Update black to 21.5b1 ([#3167](https://github.com/cookiecutter/cookiecutter-django/pull/3167)) +- Update flake8 to 3.9.2 ([#3164](https://github.com/cookiecutter/cookiecutter-django/pull/3164)) +- Update pytest-django to 4.3.0 ([#3182](https://github.com/cookiecutter/cookiecutter-django/pull/3182)) +- Auto-update pre-commit hooks ([#3157](https://github.com/cookiecutter/cookiecutter-django/pull/3157)) +- Update python-slugify to 5.0.2 ([#3161](https://github.com/cookiecutter/cookiecutter-django/pull/3161)) +- Bump stefanzweifel/git-auto-commit-action from 4.10.0 to 4.11.0 ([#3171](https://github.com/cookiecutter/cookiecutter-django/pull/3171)) +- Update sentry-sdk to 1.1.0 ([#3163](https://github.com/cookiecutter/cookiecutter-django/pull/3163)) +- Bump actions/setup-python from 2 to 2.2.2 ([#3173](https://github.com/cookiecutter/cookiecutter-django/pull/3173)) +- Update tox to 3.23.1 ([#3160](https://github.com/cookiecutter/cookiecutter-django/pull/3160)) +- Update pytest to 6.2.4 ([#3156](https://github.com/cookiecutter/cookiecutter-django/pull/3156)) +- Bump peter-evans/create-pull-request from 3.8.2 to 3.9.2 ([#3179](https://github.com/cookiecutter/cookiecutter-django/pull/3179)) +- Update sphinx to 4.0.1 ([#3169](https://github.com/cookiecutter/cookiecutter-django/pull/3169)) +- Update cookiecutter to 1.7.3 ([#3180](https://github.com/cookiecutter/cookiecutter-django/pull/3180)) +- Update django to 3.1.11 ([#3178](https://github.com/cookiecutter/cookiecutter-django/pull/3178)) ## [2021-05-06] ### Updated -- Update django to 3.1.10 ([#3162](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3162)) +- Update django to 3.1.10 ([#3162](https://github.com/cookiecutter/cookiecutter-django/pull/3162)) ## [2021-05-04] ### Updated -- Update django to 3.1.9 ([#3155](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3155)) +- Update django to 3.1.9 ([#3155](https://github.com/cookiecutter/cookiecutter-django/pull/3155)) ## [2021-04-30] ### Fixed -- Fix linting error in production.py ([#3148](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3148)) +- Fix linting error in production.py ([#3148](https://github.com/cookiecutter/cookiecutter-django/pull/3148)) ## [2021-04-29] ### Updated -- Update black to 21.4b2 ([#3147](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3147)) -- Auto-update pre-commit hooks ([#3146](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3146)) +- Update black to 21.4b2 ([#3147](https://github.com/cookiecutter/cookiecutter-django/pull/3147)) +- Auto-update pre-commit hooks ([#3146](https://github.com/cookiecutter/cookiecutter-django/pull/3146)) ## [2021-04-28] ### Changed -- Fix README link ([#3144](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3144)) +- Fix README link ([#3144](https://github.com/cookiecutter/cookiecutter-django/pull/3144)) ### Updated -- Auto-update pre-commit hooks ([#3145](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3145)) +- Auto-update pre-commit hooks ([#3145](https://github.com/cookiecutter/cookiecutter-django/pull/3145)) ## [2021-04-27] ### Updated -- Update pygithub to 1.55 ([#3141](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3141)) -- Update black to 21.4b1 ([#3143](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3143)) +- Update pygithub to 1.55 ([#3141](https://github.com/cookiecutter/cookiecutter-django/pull/3141)) +- Update black to 21.4b1 ([#3143](https://github.com/cookiecutter/cookiecutter-django/pull/3143)) ## [2021-04-26] ### Updated -- Update black to 21.4b0 ([#3138](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3138)) -- Auto-update pre-commit hooks ([#3137](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3137)) +- Update black to 21.4b0 ([#3138](https://github.com/cookiecutter/cookiecutter-django/pull/3138)) +- Auto-update pre-commit hooks ([#3137](https://github.com/cookiecutter/cookiecutter-django/pull/3137)) ## [2021-04-21] ### Updated -- Auto-update pre-commit hooks ([#3133](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3133)) -- Update django-extensions to 3.1.3 ([#3136](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3136)) -- Update django-compressor to 2.4.1 ([#3135](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3135)) -- Update pre-commit to 2.12.1 ([#3134](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3134)) -- Update flake8 to 3.9.1 ([#3131](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3131)) -- Update django-stubs to 1.8.0 ([#3127](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3127)) -- Update sphinx to 3.5.4 ([#3126](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3126)) +- Auto-update pre-commit hooks ([#3133](https://github.com/cookiecutter/cookiecutter-django/pull/3133)) +- Update django-extensions to 3.1.3 ([#3136](https://github.com/cookiecutter/cookiecutter-django/pull/3136)) +- Update django-compressor to 2.4.1 ([#3135](https://github.com/cookiecutter/cookiecutter-django/pull/3135)) +- Update pre-commit to 2.12.1 ([#3134](https://github.com/cookiecutter/cookiecutter-django/pull/3134)) +- Update flake8 to 3.9.1 ([#3131](https://github.com/cookiecutter/cookiecutter-django/pull/3131)) +- Update django-stubs to 1.8.0 ([#3127](https://github.com/cookiecutter/cookiecutter-django/pull/3127)) +- Update sphinx to 3.5.4 ([#3126](https://github.com/cookiecutter/cookiecutter-django/pull/3126)) ## [2021-04-15] ### Updated -- Update django-debug-toolbar to 3.2.1 ([#3129](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3129)) +- Update django-debug-toolbar to 3.2.1 ([#3129](https://github.com/cookiecutter/cookiecutter-django/pull/3129)) ## [2021-04-14] ### Updated -- Bump stefanzweifel/git-auto-commit-action from v4.9.2 to v4.10.0 ([#3128](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3128)) +- Bump stefanzweifel/git-auto-commit-action from v4.9.2 to v4.10.0 ([#3128](https://github.com/cookiecutter/cookiecutter-django/pull/3128)) ## [2021-04-11] ### Updated -- Update pytest-django to 4.2.0 ([#3125](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3125)) -- Update pylint-django to 2.4.3 ([#3122](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3122)) +- Update pytest-django to 4.2.0 ([#3125](https://github.com/cookiecutter/cookiecutter-django/pull/3125)) +- Update pylint-django to 2.4.3 ([#3122](https://github.com/cookiecutter/cookiecutter-django/pull/3122)) ## [2021-04-09] ### Changed -- Update from Python 3.8 to Python 3.9 ([#3023](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3023)) +- Update from Python 3.8 to Python 3.9 ([#3023](https://github.com/cookiecutter/cookiecutter-django/pull/3023)) ## [2021-04-08] ### Changed -- Switch .dockerignore to explicit list ([#3121](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3121)) -- Change Docker image to multi-stage build for Django ([#2815](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2815)) -- Fix deprecated warning in middleware tests ([#3038](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3038)) +- Switch .dockerignore to explicit list ([#3121](https://github.com/cookiecutter/cookiecutter-django/pull/3121)) +- Change Docker image to multi-stage build for Django ([#2815](https://github.com/cookiecutter/cookiecutter-django/pull/2815)) +- Fix deprecated warning in middleware tests ([#3038](https://github.com/cookiecutter/cookiecutter-django/pull/3038)) ### Updated -- Update pre-commit to 2.12.0 ([#3120](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3120)) +- Update pre-commit to 2.12.0 ([#3120](https://github.com/cookiecutter/cookiecutter-django/pull/3120)) ## [2021-04-07] ### Changed -- Update django to 3.1.8 ([#3117](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3117)) +- Update django to 3.1.8 ([#3117](https://github.com/cookiecutter/cookiecutter-django/pull/3117)) ### Fixed -- Fix linting via pre-commit on Github CI ([#3077](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3077)) -- Fix gitlab-ci using duplicate key name for image ([#3112](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3112)) +- Fix linting via pre-commit on Github CI ([#3077](https://github.com/cookiecutter/cookiecutter-django/pull/3077)) +- Fix gitlab-ci using duplicate key name for image ([#3112](https://github.com/cookiecutter/cookiecutter-django/pull/3112)) ### Updated -- Update sentry-sdk to 1.0.0 ([#3080](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3080)) -- Update gunicorn to 20.1.0 ([#3108](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3108)) -- Update pre-commit to 2.12.0 ([#3118](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3118)) -- Update django-extensions to 3.1.2 ([#3116](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3116)) -- Update pillow to 8.2.0 ([#3113](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3113)) -- Update pytest to 6.2.3 ([#3115](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3115)) +- Update sentry-sdk to 1.0.0 ([#3080](https://github.com/cookiecutter/cookiecutter-django/pull/3080)) +- Update gunicorn to 20.1.0 ([#3108](https://github.com/cookiecutter/cookiecutter-django/pull/3108)) +- Update pre-commit to 2.12.0 ([#3118](https://github.com/cookiecutter/cookiecutter-django/pull/3118)) +- Update django-extensions to 3.1.2 ([#3116](https://github.com/cookiecutter/cookiecutter-django/pull/3116)) +- Update pillow to 8.2.0 ([#3113](https://github.com/cookiecutter/cookiecutter-django/pull/3113)) +- Update pytest to 6.2.3 ([#3115](https://github.com/cookiecutter/cookiecutter-django/pull/3115)) ## [2021-03-26] ### Updated -- Update djangorestframework to 3.12.4 ([#3107](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3107)) +- Update djangorestframework to 3.12.4 ([#3107](https://github.com/cookiecutter/cookiecutter-django/pull/3107)) ## [2021-03-25] ### Updated -- Update djangorestframework to 3.12.3 ([#3105](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3105)) +- Update djangorestframework to 3.12.3 ([#3105](https://github.com/cookiecutter/cookiecutter-django/pull/3105)) ## [2021-03-22] ### Updated -- Update django-crispy-forms to 1.11.2 ([#3104](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3104)) -- Update sphinx to 3.5.3 ([#3103](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3103)) -- Update ipdb to 0.13.7 ([#3102](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3102)) -- Update sphinx-autobuild to 2021.3.14 ([#3101](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3101)) -- Update isort to 5.8.0 ([#3100](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3100)) -- Update pre-commit to 2.11.1 ([#3089](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3089)) -- Update flake8 to 3.9.0 ([#3096](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3096)) -- Update pillow to 8.1.2 ([#3084](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3084)) -- Auto-update pre-commit hooks ([#3095](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3095)) +- Update django-crispy-forms to 1.11.2 ([#3104](https://github.com/cookiecutter/cookiecutter-django/pull/3104)) +- Update sphinx to 3.5.3 ([#3103](https://github.com/cookiecutter/cookiecutter-django/pull/3103)) +- Update ipdb to 0.13.7 ([#3102](https://github.com/cookiecutter/cookiecutter-django/pull/3102)) +- Update sphinx-autobuild to 2021.3.14 ([#3101](https://github.com/cookiecutter/cookiecutter-django/pull/3101)) +- Update isort to 5.8.0 ([#3100](https://github.com/cookiecutter/cookiecutter-django/pull/3100)) +- Update pre-commit to 2.11.1 ([#3089](https://github.com/cookiecutter/cookiecutter-django/pull/3089)) +- Update flake8 to 3.9.0 ([#3096](https://github.com/cookiecutter/cookiecutter-django/pull/3096)) +- Update pillow to 8.1.2 ([#3084](https://github.com/cookiecutter/cookiecutter-django/pull/3084)) +- Auto-update pre-commit hooks ([#3095](https://github.com/cookiecutter/cookiecutter-django/pull/3095)) ## [2021-03-05] ### Changed -- Updated test_urls.py and views.py to re-use User.get_absolute_url() ([#3070](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3070)) +- Updated test_urls.py and views.py to re-use User.get_absolute_url() ([#3070](https://github.com/cookiecutter/cookiecutter-django/pull/3070)) ### Updated -- Bump stefanzweifel/git-auto-commit-action from v4.9.1 to v4.9.2 ([#3082](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3082)) +- Bump stefanzweifel/git-auto-commit-action from v4.9.1 to v4.9.2 ([#3082](https://github.com/cookiecutter/cookiecutter-django/pull/3082)) ## [2021-03-03] ### Updated -- Update tox to 3.23.0 ([#3079](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3079)) -- Update ipdb to 0.13.5 ([#3078](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3078)) +- Update tox to 3.23.0 ([#3079](https://github.com/cookiecutter/cookiecutter-django/pull/3079)) +- Update ipdb to 0.13.5 ([#3078](https://github.com/cookiecutter/cookiecutter-django/pull/3078)) ## [2021-03-02] ### Fixed -- Fixes for pytest job in Github CI workflow ([#3076](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3076)) +- Fixes for pytest job in Github CI workflow ([#3076](https://github.com/cookiecutter/cookiecutter-django/pull/3076)) ### Updated -- Update pillow to 8.1.1 ([#3075](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3075)) -- Update coverage to 5.5 ([#3074](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3074)) +- Update pillow to 8.1.1 ([#3075](https://github.com/cookiecutter/cookiecutter-django/pull/3075)) +- Update coverage to 5.5 ([#3074](https://github.com/cookiecutter/cookiecutter-django/pull/3074)) ## [2021-02-24] ### Updated -- Bump stefanzweifel/git-auto-commit-action from v4.9.0 to v4.9.1 ([#3069](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3069)) +- Bump stefanzweifel/git-auto-commit-action from v4.9.0 to v4.9.1 ([#3069](https://github.com/cookiecutter/cookiecutter-django/pull/3069)) ## [2021-02-23] ### Changed -- Update to Django 3.1 ([#3043](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3043)) -- Lint with pre-commit on CI with Github actions ([#3066](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3066)) -- Use exception var in status code pages if available ([#2992](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2992)) +- Update to Django 3.1 ([#3043](https://github.com/cookiecutter/cookiecutter-django/pull/3043)) +- Lint with pre-commit on CI with Github actions ([#3066](https://github.com/cookiecutter/cookiecutter-django/pull/3066)) +- Use exception var in status code pages if available ([#2992](https://github.com/cookiecutter/cookiecutter-django/pull/2992)) ## [2021-02-22] ### Changed -- refactor: remove default cache settings in test.py ([#3064](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3064)) -- Update django to 3.0.13 ([#3060](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3060)) +- refactor: remove default cache settings in test.py ([#3064](https://github.com/cookiecutter/cookiecutter-django/pull/3064)) +- Update django to 3.0.13 ([#3060](https://github.com/cookiecutter/cookiecutter-django/pull/3060)) ### Fixed -- Fix missing Django Debug toolbar with node container ([#2865](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2865)) -- Remove Email from User API ([#3055](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3055)) +- Fix missing Django Debug toolbar with node container ([#2865](https://github.com/cookiecutter/cookiecutter-django/pull/2865)) +- Remove Email from User API ([#3055](https://github.com/cookiecutter/cookiecutter-django/pull/3055)) ### Updated -- Bump stefanzweifel/git-auto-commit-action from v4.8.0 to v4.9.0 ([#3065](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3065)) -- Update django-crispy-forms to 1.11.1 ([#3063](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3063)) -- Update uvicorn to 0.13.4 ([#3062](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3062)) -- Update mypy to 0.812 ([#3061](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3061)) -- Update sentry-sdk to 0.20.3 ([#3059](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3059)) -- Update tox to 3.22.0 ([#3057](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3057)) -- Update sphinx to 3.5.1 ([#3056](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3056)) +- Bump stefanzweifel/git-auto-commit-action from v4.8.0 to v4.9.0 ([#3065](https://github.com/cookiecutter/cookiecutter-django/pull/3065)) +- Update django-crispy-forms to 1.11.1 ([#3063](https://github.com/cookiecutter/cookiecutter-django/pull/3063)) +- Update uvicorn to 0.13.4 ([#3062](https://github.com/cookiecutter/cookiecutter-django/pull/3062)) +- Update mypy to 0.812 ([#3061](https://github.com/cookiecutter/cookiecutter-django/pull/3061)) +- Update sentry-sdk to 0.20.3 ([#3059](https://github.com/cookiecutter/cookiecutter-django/pull/3059)) +- Update tox to 3.22.0 ([#3057](https://github.com/cookiecutter/cookiecutter-django/pull/3057)) +- Update sphinx to 3.5.1 ([#3056](https://github.com/cookiecutter/cookiecutter-django/pull/3056)) ## [2021-02-16] ### Updated -- Update sentry-sdk to 0.20.2 ([#3054](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3054)) -- Update sphinx to 3.5.0 ([#3053](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3053)) +- Update sentry-sdk to 0.20.2 ([#3054](https://github.com/cookiecutter/cookiecutter-django/pull/3054)) +- Update sphinx to 3.5.0 ([#3053](https://github.com/cookiecutter/cookiecutter-django/pull/3053)) ## [2021-02-13] ### Updated -- Update sentry-sdk to 0.20.1 ([#3052](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3052)) +- Update sentry-sdk to 0.20.1 ([#3052](https://github.com/cookiecutter/cookiecutter-django/pull/3052)) ## [2021-02-12] ### Updated -- Update pre-commit to 2.10.1 ([#3045](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3045)) -- Update sentry-sdk to 0.20.0 ([#3051](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3051)) +- Update pre-commit to 2.10.1 ([#3045](https://github.com/cookiecutter/cookiecutter-django/pull/3045)) +- Update sentry-sdk to 0.20.0 ([#3051](https://github.com/cookiecutter/cookiecutter-django/pull/3051)) ## [2021-02-10] ### Updated -- Bump peter-evans/create-pull-request from v3.8.1 to v3.8.2 ([#3049](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3049)) +- Bump peter-evans/create-pull-request from v3.8.1 to v3.8.2 ([#3049](https://github.com/cookiecutter/cookiecutter-django/pull/3049)) ## [2021-02-08] ### Updated -- Update django-extensions to 3.1.1 ([#3047](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3047)) -- Bump peter-evans/create-pull-request from v3.8.0 to v3.8.1 ([#3046](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3046)) +- Update django-extensions to 3.1.1 ([#3047](https://github.com/cookiecutter/cookiecutter-django/pull/3047)) +- Bump peter-evans/create-pull-request from v3.8.0 to v3.8.1 ([#3046](https://github.com/cookiecutter/cookiecutter-django/pull/3046)) ## [2021-02-06] ### Changed -- Removed Redundant test_case_sensitivity() and made test_not_authenticated() get the LOGIN_URL dynamically. ([#3041](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3041)) -- Refactored users.forms to make the code more readeable ([#3029](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3029)) -- Update django to 3.0.12 ([#3037](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3037)) +- Removed Redundant test_case_sensitivity() and made test_not_authenticated() get the LOGIN_URL dynamically. ([#3041](https://github.com/cookiecutter/cookiecutter-django/pull/3041)) +- Refactored users.forms to make the code more readeable ([#3029](https://github.com/cookiecutter/cookiecutter-django/pull/3029)) +- Update django to 3.0.12 ([#3037](https://github.com/cookiecutter/cookiecutter-django/pull/3037)) ### Updated -- Update tox to 3.21.4 ([#3044](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3044)) +- Update tox to 3.21.4 ([#3044](https://github.com/cookiecutter/cookiecutter-django/pull/3044)) ## [2021-02-01] ### Updated -- Update pytz to 2021.1 ([#3035](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3035)) -- Update jinja2 to 2.11.3 ([#3033](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3033)) -- Bump peter-evans/create-pull-request from v3.7.0 to v3.8.0 ([#3034](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3034)) +- Update pytz to 2021.1 ([#3035](https://github.com/cookiecutter/cookiecutter-django/pull/3035)) +- Update jinja2 to 2.11.3 ([#3033](https://github.com/cookiecutter/cookiecutter-django/pull/3033)) +- Bump peter-evans/create-pull-request from v3.7.0 to v3.8.0 ([#3034](https://github.com/cookiecutter/cookiecutter-django/pull/3034)) ## [2021-01-31] ### Changed -- Adding local celery instructions to developing-locally ([#3031](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3031)) +- Adding local celery instructions to developing-locally ([#3031](https://github.com/cookiecutter/cookiecutter-django/pull/3031)) ### Updated -- Update django-crispy-forms to 1.11.0 ([#3032](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3032)) +- Update django-crispy-forms to 1.11.0 ([#3032](https://github.com/cookiecutter/cookiecutter-django/pull/3032)) ## [2021-01-28] ### Updated -- Update pre-commit to 2.10.0 ([#3028](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3028)) -- Update django-anymail to 8.2 ([#3027](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3027)) -- Update tox to 3.21.3 ([#3026](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3026)) +- Update pre-commit to 2.10.0 ([#3028](https://github.com/cookiecutter/cookiecutter-django/pull/3028)) +- Update django-anymail to 8.2 ([#3027](https://github.com/cookiecutter/cookiecutter-django/pull/3027)) +- Update tox to 3.21.3 ([#3026](https://github.com/cookiecutter/cookiecutter-django/pull/3026)) ## [2021-01-26] ### Changed -- Bump peter-evans/create-pull-request from v3.6.0 to v3.7.0 ([#3022](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3022)) -- Using SuccessMessageMixin to send success message to django template ([#3021](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3021)) +- Bump peter-evans/create-pull-request from v3.6.0 to v3.7.0 ([#3022](https://github.com/cookiecutter/cookiecutter-django/pull/3022)) +- Using SuccessMessageMixin to send success message to django template ([#3021](https://github.com/cookiecutter/cookiecutter-django/pull/3021)) ### Fixed -- Update admin to ignore *_name User attributes ([#3018](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3018)) +- Update admin to ignore *_name User attributes ([#3018](https://github.com/cookiecutter/cookiecutter-django/pull/3018)) ### Updated -- Update coverage to 5.4 ([#3024](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3024)) -- Update pytest to 6.2.2 ([#3020](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3020)) -- Update django-cors-headers to 3.7.0 ([#3019](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3019)) +- Update coverage to 5.4 ([#3024](https://github.com/cookiecutter/cookiecutter-django/pull/3024)) +- Update pytest to 6.2.2 ([#3020](https://github.com/cookiecutter/cookiecutter-django/pull/3020)) +- Update django-cors-headers to 3.7.0 ([#3019](https://github.com/cookiecutter/cookiecutter-django/pull/3019)) ## [2021-01-24] ### Changed -- Use defer for script tags (Fix #2922) ([#2927](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2927)) -- Made Traefik conf much easier to understand and improved redirect res… ([#2838](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2838)) -- Sentry Redis integration enabled by default in production. ([#2989](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2989)) -- Add test for UserUpdateView.form_valid() ([#2949](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2949)) +- Use defer for script tags (Fix #2922) ([#2927](https://github.com/cookiecutter/cookiecutter-django/pull/2927)) +- Made Traefik conf much easier to understand and improved redirect res… ([#2838](https://github.com/cookiecutter/cookiecutter-django/pull/2838)) +- Sentry Redis integration enabled by default in production. ([#2989](https://github.com/cookiecutter/cookiecutter-django/pull/2989)) +- Add test for UserUpdateView.form_valid() ([#2949](https://github.com/cookiecutter/cookiecutter-django/pull/2949)) ### Fixed -- Omit first_name and last_name in User model ([#2998](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2998)) +- Omit first_name and last_name in User model ([#2998](https://github.com/cookiecutter/cookiecutter-django/pull/2998)) ### Updated -- Update django-celery-beat to 2.2.0 ([#3009](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3009)) -- Update pyyaml to 5.4.1 ([#3011](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3011)) -- Update mypy to 0.800 ([#3013](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3013)) -- Update factory-boy to 3.2.0 ([#2986](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2986)) -- Update tox to 3.21.2 ([#3010](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3010)) +- Update django-celery-beat to 2.2.0 ([#3009](https://github.com/cookiecutter/cookiecutter-django/pull/3009)) +- Update pyyaml to 5.4.1 ([#3011](https://github.com/cookiecutter/cookiecutter-django/pull/3011)) +- Update mypy to 0.800 ([#3013](https://github.com/cookiecutter/cookiecutter-django/pull/3013)) +- Update factory-boy to 3.2.0 ([#2986](https://github.com/cookiecutter/cookiecutter-django/pull/2986)) +- Update tox to 3.21.2 ([#3010](https://github.com/cookiecutter/cookiecutter-django/pull/3010)) ## [2021-01-22] ### Changed -- Use self.request.user instead of second query ([#3012](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3012)) +- Use self.request.user instead of second query ([#3012](https://github.com/cookiecutter/cookiecutter-django/pull/3012)) ## [2021-01-14] ### Updated -- Update tox to 3.21.1 ([#3006](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3006)) +- Update tox to 3.21.1 ([#3006](https://github.com/cookiecutter/cookiecutter-django/pull/3006)) ## [2021-01-10] ### Updated -- Update pylint-django to 2.4.2 ([#3003](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3003)) -- Update tox to 3.21.0 ([#3002](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3002)) +- Update pylint-django to 2.4.2 ([#3003](https://github.com/cookiecutter/cookiecutter-django/pull/3003)) +- Update tox to 3.21.0 ([#3002](https://github.com/cookiecutter/cookiecutter-django/pull/3002)) ## [2021-01-08] ### Changed -- Upgrade Travis to Focal ([#2999](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2999)) +- Upgrade Travis to Focal ([#2999](https://github.com/cookiecutter/cookiecutter-django/pull/2999)) ### Updated -- Update pylint-django to 2.4.1 ([#3001](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3001)) -- Update sphinx to 3.4.3 ([#3000](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3000)) -- Update pylint-django to 2.4.0 ([#2996](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2996)) +- Update pylint-django to 2.4.1 ([#3001](https://github.com/cookiecutter/cookiecutter-django/pull/3001)) +- Update sphinx to 3.4.3 ([#3000](https://github.com/cookiecutter/cookiecutter-django/pull/3000)) +- Update pylint-django to 2.4.0 ([#2996](https://github.com/cookiecutter/cookiecutter-django/pull/2996)) ## [2021-01-04] ### Updated -- Update isort to 5.7.0 ([#2988](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2988)) -- Update uvicorn to 0.13.3 ([#2987](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2987)) -- Auto-update pre-commit hooks ([#2990](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2990)) -- Update sphinx to 3.4.2 ([#2995](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2995)) -- Update pillow to 8.1.0 ([#2993](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2993)) +- Update isort to 5.7.0 ([#2988](https://github.com/cookiecutter/cookiecutter-django/pull/2988)) +- Update uvicorn to 0.13.3 ([#2987](https://github.com/cookiecutter/cookiecutter-django/pull/2987)) +- Auto-update pre-commit hooks ([#2990](https://github.com/cookiecutter/cookiecutter-django/pull/2990)) +- Update sphinx to 3.4.2 ([#2995](https://github.com/cookiecutter/cookiecutter-django/pull/2995)) +- Update pillow to 8.1.0 ([#2993](https://github.com/cookiecutter/cookiecutter-django/pull/2993)) ## [2020-12-29] ### Updated -- Update pygithub to 1.54.1 ([#2982](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2982)) -- Update django-storages to 1.11.1 ([#2981](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2981)) +- Update pygithub to 1.54.1 ([#2982](https://github.com/cookiecutter/cookiecutter-django/pull/2982)) +- Update django-storages to 1.11.1 ([#2981](https://github.com/cookiecutter/cookiecutter-django/pull/2981)) ## [2020-12-26] ### Updated -- Update sphinx to 3.4.1 ([#2985](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2985)) -- Update pytz to 2020.5 ([#2984](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2984)) +- Update sphinx to 3.4.1 ([#2985](https://github.com/cookiecutter/cookiecutter-django/pull/2985)) +- Update pytz to 2020.5 ([#2984](https://github.com/cookiecutter/cookiecutter-django/pull/2984)) ## [2020-12-23] ### Changed -- Bump peter-evans/create-pull-request from v3.5.2 to v3.6.0 ([#2980](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2980)) +- Bump peter-evans/create-pull-request from v3.5.2 to v3.6.0 ([#2980](https://github.com/cookiecutter/cookiecutter-django/pull/2980)) ### Updated -- Update flower to 0.9.7 ([#2979](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2979)) -- Update sphinx to 3.4.0 ([#2978](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2978)) -- Update coverage to 5.3.1 ([#2977](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2977)) -- Update uvicorn to 0.13.2 ([#2976](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2976)) +- Update flower to 0.9.7 ([#2979](https://github.com/cookiecutter/cookiecutter-django/pull/2979)) +- Update sphinx to 3.4.0 ([#2978](https://github.com/cookiecutter/cookiecutter-django/pull/2978)) +- Update coverage to 5.3.1 ([#2977](https://github.com/cookiecutter/cookiecutter-django/pull/2977)) +- Update uvicorn to 0.13.2 ([#2976](https://github.com/cookiecutter/cookiecutter-django/pull/2976)) ## [2020-12-18] ### Changed -- Bump stefanzweifel/git-auto-commit-action from v4.7.2 to v4.8.0 ([#2972](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2972)) +- Bump stefanzweifel/git-auto-commit-action from v4.7.2 to v4.8.0 ([#2972](https://github.com/cookiecutter/cookiecutter-django/pull/2972)) ### Updated -- Update django-storages to 1.11 ([#2973](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2973)) -- Update pytest to 6.2.1 ([#2971](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2971)) -- Auto-update pre-commit hooks ([#2970](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2970)) +- Update django-storages to 1.11 ([#2973](https://github.com/cookiecutter/cookiecutter-django/pull/2973)) +- Update pytest to 6.2.1 ([#2971](https://github.com/cookiecutter/cookiecutter-django/pull/2971)) +- Auto-update pre-commit hooks ([#2970](https://github.com/cookiecutter/cookiecutter-django/pull/2970)) ## [2020-12-14] ### Updated -- Update pytest to 6.2.0 ([#2968](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2968)) -- Update django-cors-headers to 3.6.0 ([#2967](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2967)) -- Update uvicorn to 0.13.1 ([#2966](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2966)) +- Update pytest to 6.2.0 ([#2968](https://github.com/cookiecutter/cookiecutter-django/pull/2968)) +- Update django-cors-headers to 3.6.0 ([#2967](https://github.com/cookiecutter/cookiecutter-django/pull/2967)) +- Update uvicorn to 0.13.1 ([#2966](https://github.com/cookiecutter/cookiecutter-django/pull/2966)) ## [2020-12-10] ### Changed -- Hot-reload support to celery ([#2554](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2554)) +- Hot-reload support to celery ([#2554](https://github.com/cookiecutter/cookiecutter-django/pull/2554)) ### Updated -- Update uvicorn to 0.13.0 ([#2962](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2962)) -- Update sentry-sdk to 0.19.5 ([#2965](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2965)) +- Update uvicorn to 0.13.0 ([#2962](https://github.com/cookiecutter/cookiecutter-django/pull/2962)) +- Update sentry-sdk to 0.19.5 ([#2965](https://github.com/cookiecutter/cookiecutter-django/pull/2965)) ## [2020-12-09] ### Changed -- Bump peter-evans/create-pull-request from v3.5.1 to v3.5.2 ([#2964](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2964)) +- Bump peter-evans/create-pull-request from v3.5.1 to v3.5.2 ([#2964](https://github.com/cookiecutter/cookiecutter-django/pull/2964)) ## [2020-12-08] ### Updated -- Update pre-commit to 2.9.3 ([#2961](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2961)) +- Update pre-commit to 2.9.3 ([#2961](https://github.com/cookiecutter/cookiecutter-django/pull/2961)) ## [2020-12-04] ### Updated -- Update django-debug-toolbar to 3.2 ([#2959](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2959)) +- Update django-debug-toolbar to 3.2 ([#2959](https://github.com/cookiecutter/cookiecutter-django/pull/2959)) ## [2020-12-02] ### Updated -- Update django-model-utils to 4.1.1 ([#2957](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2957)) -- Update pygithub to 1.54 ([#2958](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2958)) +- Update django-model-utils to 4.1.1 ([#2957](https://github.com/cookiecutter/cookiecutter-django/pull/2957)) +- Update pygithub to 1.54 ([#2958](https://github.com/cookiecutter/cookiecutter-django/pull/2958)) ## [2020-11-26] ### Updated -- Update django-extensions to 3.1.0 ([#2947](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2947)) -- Update pre-commit to 2.9.2 ([#2948](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2948)) -- Update django-allauth to 0.44.0 ([#2945](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2945)) +- Update django-extensions to 3.1.0 ([#2947](https://github.com/cookiecutter/cookiecutter-django/pull/2947)) +- Update pre-commit to 2.9.2 ([#2948](https://github.com/cookiecutter/cookiecutter-django/pull/2948)) +- Update django-allauth to 0.44.0 ([#2945](https://github.com/cookiecutter/cookiecutter-django/pull/2945)) ## [2020-11-25] ### Changed -- Bump peter-evans/create-pull-request from v3.5.0 to v3.5.1 ([#2944](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2944)) +- Bump peter-evans/create-pull-request from v3.5.0 to v3.5.1 ([#2944](https://github.com/cookiecutter/cookiecutter-django/pull/2944)) ## [2020-11-23] ### Updated -- Update uvicorn to 0.12.3 ([#2943](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2943)) -- Update pre-commit to 2.9.0 ([#2942](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2942)) +- Update uvicorn to 0.12.3 ([#2943](https://github.com/cookiecutter/cookiecutter-django/pull/2943)) +- Update pre-commit to 2.9.0 ([#2942](https://github.com/cookiecutter/cookiecutter-django/pull/2942)) ## [2020-11-21] ### Changed -- Fix after uvicorn 0.12.0 - Ship extra dependencies ([#2939](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2939)) +- Fix after uvicorn 0.12.0 - Ship extra dependencies ([#2939](https://github.com/cookiecutter/cookiecutter-django/pull/2939)) ## [2020-11-20] ### Updated -- Update sentry-sdk to 0.19.4 ([#2938](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2938)) +- Update sentry-sdk to 0.19.4 ([#2938](https://github.com/cookiecutter/cookiecutter-django/pull/2938)) ## [2020-11-19] ### Updated -- Update django-crispy-forms to 1.10.0 ([#2937](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2937)) +- Update django-crispy-forms to 1.10.0 ([#2937](https://github.com/cookiecutter/cookiecutter-django/pull/2937)) ## [2020-11-17] ### Changed -- Bump peter-evans/create-pull-request from v2 to v3.5.0 ([#2936](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2936)) +- Bump peter-evans/create-pull-request from v2 to v3.5.0 ([#2936](https://github.com/cookiecutter/cookiecutter-django/pull/2936)) ## [2020-11-15] ### Changed -- Fix formatting in docs ([#2935](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2935)) +- Fix formatting in docs ([#2935](https://github.com/cookiecutter/cookiecutter-django/pull/2935)) ## [2020-11-13] ### Changed -- Upgrade factory-boy to 3.1.0 ([#2932](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2932)) +- Upgrade factory-boy to 3.1.0 ([#2932](https://github.com/cookiecutter/cookiecutter-django/pull/2932)) ### Updated -- Update sentry-sdk to 0.19.3 ([#2933](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2933)) -- Update sphinx to 3.3.1 ([#2934](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2934)) +- Update sentry-sdk to 0.19.3 ([#2933](https://github.com/cookiecutter/cookiecutter-django/pull/2933)) +- Update sphinx to 3.3.1 ([#2934](https://github.com/cookiecutter/cookiecutter-django/pull/2934)) ## [2020-11-12] ### Changed -- Migrate CI to Github Actions ([#2931](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2931)) +- Migrate CI to Github Actions ([#2931](https://github.com/cookiecutter/cookiecutter-django/pull/2931)) ## [2020-11-06] ### Updated -- Update djangorestframework to 3.12.2 ([#2930](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2930)) +- Update djangorestframework to 3.12.2 ([#2930](https://github.com/cookiecutter/cookiecutter-django/pull/2930)) ## [2020-11-04] ### Changed -- Fix docs service and add RTD support ([#2920](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2920)) -- Bump stefanzweifel/git-auto-commit-action from v4.6.0 to v4.7.2 ([#2914](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2914)) +- Fix docs service and add RTD support ([#2920](https://github.com/cookiecutter/cookiecutter-django/pull/2920)) +- Bump stefanzweifel/git-auto-commit-action from v4.6.0 to v4.7.2 ([#2914](https://github.com/cookiecutter/cookiecutter-django/pull/2914)) ### Updated -- Auto-update pre-commit hooks ([#2908](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2908)) -- Update mypy to 0.790 ([#2886](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2886)) -- Update django-stubs to 1.7.0 ([#2916](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2916)) +- Auto-update pre-commit hooks ([#2908](https://github.com/cookiecutter/cookiecutter-django/pull/2908)) +- Update mypy to 0.790 ([#2886](https://github.com/cookiecutter/cookiecutter-django/pull/2886)) +- Update django-stubs to 1.7.0 ([#2916](https://github.com/cookiecutter/cookiecutter-django/pull/2916)) ## [2020-11-03] ### Updated -- Update sentry-sdk to 0.19.2 ([#2926](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2926)) -- Update sphinx to 3.3.0 ([#2925](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2925)) -- Update django to 3.0.11 ([#2924](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2924)) -- Update pytz to 2020.4 ([#2923](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2923)) -- Update pre-commit to 2.8.2 ([#2919](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2919)) -- Update pytest to 6.1.2 ([#2917](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2917)) -- Update sh to 1.14.1 ([#2912](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2912)) -- Update pytest-django to 4.1.0 ([#2911](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2911)) -- Update pillow to 8.0.1 ([#2910](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2910)) -- Update django-celery-beat to 2.1.0 ([#2907](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2907)) -- Update uvicorn to 0.12.2 ([#2906](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2906)) +- Update sentry-sdk to 0.19.2 ([#2926](https://github.com/cookiecutter/cookiecutter-django/pull/2926)) +- Update sphinx to 3.3.0 ([#2925](https://github.com/cookiecutter/cookiecutter-django/pull/2925)) +- Update django to 3.0.11 ([#2924](https://github.com/cookiecutter/cookiecutter-django/pull/2924)) +- Update pytz to 2020.4 ([#2923](https://github.com/cookiecutter/cookiecutter-django/pull/2923)) +- Update pre-commit to 2.8.2 ([#2919](https://github.com/cookiecutter/cookiecutter-django/pull/2919)) +- Update pytest to 6.1.2 ([#2917](https://github.com/cookiecutter/cookiecutter-django/pull/2917)) +- Update sh to 1.14.1 ([#2912](https://github.com/cookiecutter/cookiecutter-django/pull/2912)) +- Update pytest-django to 4.1.0 ([#2911](https://github.com/cookiecutter/cookiecutter-django/pull/2911)) +- Update pillow to 8.0.1 ([#2910](https://github.com/cookiecutter/cookiecutter-django/pull/2910)) +- Update django-celery-beat to 2.1.0 ([#2907](https://github.com/cookiecutter/cookiecutter-django/pull/2907)) +- Update uvicorn to 0.12.2 ([#2906](https://github.com/cookiecutter/cookiecutter-django/pull/2906)) ## [2020-10-19] ### Updated -- Update sentry-sdk to 0.19.1 ([#2905](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2905)) +- Update sentry-sdk to 0.19.1 ([#2905](https://github.com/cookiecutter/cookiecutter-django/pull/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)) +- Update django-allauth to 0.43.0 ([#2901](https://github.com/cookiecutter/cookiecutter-django/pull/2901)) +- Update pytest-django to 4.0.0 ([#2903](https://github.com/cookiecutter/cookiecutter-django/pull/2903)) ## [2020-10-15] ### Updated -- Update pillow to 8.0.0 ([#2898](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2898)) +- Update pillow to 8.0.0 ([#2898](https://github.com/cookiecutter/cookiecutter-django/pull/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)) +- Auto-update pre-commit hooks ([#2897](https://github.com/cookiecutter/cookiecutter-django/pull/2897)) +- Update sentry-sdk to 0.19.0 ([#2896](https://github.com/cookiecutter/cookiecutter-django/pull/2896)) ## [2020-10-13] ### Updated -- Update isort to 5.6.4 ([#2895](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2895)) +- Update isort to 5.6.4 ([#2895](https://github.com/cookiecutter/cookiecutter-django/pull/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)) +- Bump stefanzweifel/git-auto-commit-action from v4.5.1 to v4.6.0 ([#2893](https://github.com/cookiecutter/cookiecutter-django/pull/2893)) ### Updated -- Auto-update pre-commit hooks ([#2892](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2892)) +- Auto-update pre-commit hooks ([#2892](https://github.com/cookiecutter/cookiecutter-django/pull/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)) +- Auto-update pre-commit hooks ([#2890](https://github.com/cookiecutter/cookiecutter-django/pull/2890)) +- Update isort to 5.6.3 ([#2891](https://github.com/cookiecutter/cookiecutter-django/pull/2891)) +- Update django-anymail to 8.1 ([#2887](https://github.com/cookiecutter/cookiecutter-django/pull/2887)) +- Update tox to 3.20.1 ([#2885](https://github.com/cookiecutter/cookiecutter-django/pull/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)) +- Auto-update pre-commit hooks ([#2884](https://github.com/cookiecutter/cookiecutter-django/pull/2884)) +- Update isort to 5.6.1 ([#2883](https://github.com/cookiecutter/cookiecutter-django/pull/2883)) ## [2020-10-08] ### Changed -- Add dedicated websockets package ([#2881](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2881)) +- Add dedicated websockets package ([#2881](https://github.com/cookiecutter/cookiecutter-django/pull/2881)) ### Updated -- Update isort to 5.6.0 ([#2882](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2882)) +- Update isort to 5.6.0 ([#2882](https://github.com/cookiecutter/cookiecutter-django/pull/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)) +- Update pytest to 6.1.1 ([#2880](https://github.com/cookiecutter/cookiecutter-django/pull/2880)) +- Update mypy and django-stubs ([#2874](https://github.com/cookiecutter/cookiecutter-django/pull/2874)) +- Auto-update pre-commit hooks ([#2876](https://github.com/cookiecutter/cookiecutter-django/pull/2876)) +- Update flake8 to 3.8.4 ([#2877](https://github.com/cookiecutter/cookiecutter-django/pull/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)) +- Bump actions/setup-python from v2.1.2 to v2.1.3 ([#2869](https://github.com/cookiecutter/cookiecutter-django/pull/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)) +- Update ipdb to 0.13.4 ([#2873](https://github.com/cookiecutter/cookiecutter-django/pull/2873)) +- Auto-update pre-commit hooks ([#2867](https://github.com/cookiecutter/cookiecutter-django/pull/2867)) +- Update uvicorn to 0.12.1 ([#2866](https://github.com/cookiecutter/cookiecutter-django/pull/2866)) +- Update isort to 5.5.4 ([#2864](https://github.com/cookiecutter/cookiecutter-django/pull/2864)) +- Update sentry-sdk to 0.18.0 ([#2863](https://github.com/cookiecutter/cookiecutter-django/pull/2863)) +- Update djangorestframework to 3.12.1 ([#2862](https://github.com/cookiecutter/cookiecutter-django/pull/2862)) +- Update pytest to 6.1.0 ([#2859](https://github.com/cookiecutter/cookiecutter-django/pull/2859)) +- Update django-debug-toolbar to 3.1.1 ([#2855](https://github.com/cookiecutter/cookiecutter-django/pull/2855)) ## [2020-09-23] ### Updated -- Update sentry-sdk to 0.17.7 ([#2847](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2847)) -- Update django-debug-toolbar to 3.1 ([#2846](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2846)) +- Update sentry-sdk to 0.17.7 ([#2847](https://github.com/cookiecutter/cookiecutter-django/pull/2847)) +- Update django-debug-toolbar to 3.1 ([#2846](https://github.com/cookiecutter/cookiecutter-django/pull/2846)) ## [2020-09-21] ### Changed -- Adding GitHub-Action CI Option ([#2837](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2837)) +- Adding GitHub-Action CI Option ([#2837](https://github.com/cookiecutter/cookiecutter-django/pull/2837)) ### Updated -- Update django-debug-toolbar to 3.0 ([#2842](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2842)) -- Auto-update pre-commit hooks ([#2843](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2843)) -- Update isort to 5.5.3 ([#2844](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2844)) +- Update django-debug-toolbar to 3.0 ([#2842](https://github.com/cookiecutter/cookiecutter-django/pull/2842)) +- Auto-update pre-commit hooks ([#2843](https://github.com/cookiecutter/cookiecutter-django/pull/2843)) +- Update isort to 5.5.3 ([#2844](https://github.com/cookiecutter/cookiecutter-django/pull/2844)) ## [2020-09-18] ### Updated -- Update django-extensions to 3.0.9 ([#2839](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2839)) +- Update django-extensions to 3.0.9 ([#2839](https://github.com/cookiecutter/cookiecutter-django/pull/2839)) ## [2020-09-16] ### Updated -- Update sentry-sdk to 0.17.6 ([#2833](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2833)) -- Update pytest-django to 3.10.0 ([#2832](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2832)) +- Update sentry-sdk to 0.17.6 ([#2833](https://github.com/cookiecutter/cookiecutter-django/pull/2833)) +- Update pytest-django to 3.10.0 ([#2832](https://github.com/cookiecutter/cookiecutter-django/pull/2832)) ## [2020-09-14] ### Fixed -- Downgrade Celery to 4.4.6 ([#2829](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2829)) +- Downgrade Celery to 4.4.6 ([#2829](https://github.com/cookiecutter/cookiecutter-django/pull/2829)) ### Updated -- Update sentry-sdk to 0.17.5 ([#2828](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2828)) -- Update coverage to 5.3 ([#2826](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2826)) -- Update django-storages to 1.10.1 ([#2825](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2825)) +- Update sentry-sdk to 0.17.5 ([#2828](https://github.com/cookiecutter/cookiecutter-django/pull/2828)) +- Update coverage to 5.3 ([#2826](https://github.com/cookiecutter/cookiecutter-django/pull/2826)) +- Update django-storages to 1.10.1 ([#2825](https://github.com/cookiecutter/cookiecutter-django/pull/2825)) ## [2020-09-12] ### Updated -- Updating Traefik version from 2.0 to 2.2.11 ([#2814](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2814)) -- Update pytest to 6.0.2 ([#2819](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2819)) -- Update django-anymail to 8.0 ([#2818](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2818)) +- Updating Traefik version from 2.0 to 2.2.11 ([#2814](https://github.com/cookiecutter/cookiecutter-django/pull/2814)) +- Update pytest to 6.0.2 ([#2819](https://github.com/cookiecutter/cookiecutter-django/pull/2819)) +- Update django-anymail to 8.0 ([#2818](https://github.com/cookiecutter/cookiecutter-django/pull/2818)) ## [2020-09-11] ### Updated -- Auto-update pre-commit hooks ([#2809](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2809)) +- Auto-update pre-commit hooks ([#2809](https://github.com/cookiecutter/cookiecutter-django/pull/2809)) ## [2020-09-10] ### Updated -- Update isort to 5.5.2 ([#2807](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2807)) -- Update sentry-sdk to 0.17.4 ([#2805](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2805)) +- Update isort to 5.5.2 ([#2807](https://github.com/cookiecutter/cookiecutter-django/pull/2807)) +- Update sentry-sdk to 0.17.4 ([#2805](https://github.com/cookiecutter/cookiecutter-django/pull/2805)) ## [2020-09-09] ### Changed -- Update actions/setup-python requirement to v2.1.2 ([#2804](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2804)) -- Clean up nested venv files from `.gitignore` ([#2800](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2800)) +- Update actions/setup-python requirement to v2.1.2 ([#2804](https://github.com/cookiecutter/cookiecutter-django/pull/2804)) +- Clean up nested venv files from `.gitignore` ([#2800](https://github.com/cookiecutter/cookiecutter-django/pull/2800)) ## [2020-09-08] ### Changed -- Traeffik and Django dockerfile changes ([#2801](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2801)) +- Traeffik and Django dockerfile changes ([#2801](https://github.com/cookiecutter/cookiecutter-django/pull/2801)) ## [2020-09-07] ### Changed -- Add :z/:Z to mounted volumes in {local,production}.yml ([#2663](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2663)) -- Remove --no-binary option for psycopg2 ([#2798](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2798)) -- Updated Gitlab CI to use Python 3.8 instead of Python 3.7 ([#2794](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2794)) +- Add :z/:Z to mounted volumes in {local,production}.yml ([#2663](https://github.com/cookiecutter/cookiecutter-django/pull/2663)) +- Remove --no-binary option for psycopg2 ([#2798](https://github.com/cookiecutter/cookiecutter-django/pull/2798)) +- Updated Gitlab CI to use Python 3.8 instead of Python 3.7 ([#2794](https://github.com/cookiecutter/cookiecutter-django/pull/2794)) ### Fixed -- Fix options for sphinx-autobuild in docs Makefile ([#2799](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2799)) +- Fix options for sphinx-autobuild in docs Makefile ([#2799](https://github.com/cookiecutter/cookiecutter-django/pull/2799)) ### Updated -- Update psycopg2-binary to 2.8.6 ([#2797](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2797)) +- Update psycopg2-binary to 2.8.6 ([#2797](https://github.com/cookiecutter/cookiecutter-django/pull/2797)) ## [2020-09-05] ### Updated -- Auto-update pre-commit hooks ([#2793](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2793)) +- Auto-update pre-commit hooks ([#2793](https://github.com/cookiecutter/cookiecutter-django/pull/2793)) ## [2020-09-04] ### Updated -- Update django-extensions to 3.0.8 ([#2792](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2792)) -- Update isort to 5.5.1 ([#2791](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2791)) -- Auto-update pre-commit hooks ([#2790](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2790)) -- Update isort to 5.5.0 ([#2789](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2789)) +- Update django-extensions to 3.0.8 ([#2792](https://github.com/cookiecutter/cookiecutter-django/pull/2792)) +- Update isort to 5.5.1 ([#2791](https://github.com/cookiecutter/cookiecutter-django/pull/2791)) +- Auto-update pre-commit hooks ([#2790](https://github.com/cookiecutter/cookiecutter-django/pull/2790)) +- Update isort to 5.5.0 ([#2789](https://github.com/cookiecutter/cookiecutter-django/pull/2789)) ## [2020-09-02] ### Changed -- Add environment and traces_sample_rate keyword to sentry_sdk.init ([#2777](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2777)) +- Add environment and traces_sample_rate keyword to sentry_sdk.init ([#2777](https://github.com/cookiecutter/cookiecutter-django/pull/2777)) ### Updated -- Update sentry-sdk to 0.17.3 ([#2788](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2788)) -- Update django-extensions to 3.0.7 ([#2787](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2787)) +- Update sentry-sdk to 0.17.3 ([#2788](https://github.com/cookiecutter/cookiecutter-django/pull/2788)) +- Update django-extensions to 3.0.7 ([#2787](https://github.com/cookiecutter/cookiecutter-django/pull/2787)) ## [2020-09-01] ### Changed -- Exclude venv directory and update document link ([#2780](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2780)) +- Exclude venv directory and update document link ([#2780](https://github.com/cookiecutter/cookiecutter-django/pull/2780)) ### Updated -- Update tox to 3.20.0 ([#2786](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2786)) -- Update django-storages to 1.10 ([#2781](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2781)) -- Update sentry-sdk to 0.17.2 ([#2784](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2784)) -- Update django to 3.0.10 ([#2785](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2785)) -- Update sphinx-autobuild to 2020.9.1 ([#2782](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2782)) -- Update django-extensions to 3.0.6 ([#2783](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2783)) +- Update tox to 3.20.0 ([#2786](https://github.com/cookiecutter/cookiecutter-django/pull/2786)) +- Update django-storages to 1.10 ([#2781](https://github.com/cookiecutter/cookiecutter-django/pull/2781)) +- Update sentry-sdk to 0.17.2 ([#2784](https://github.com/cookiecutter/cookiecutter-django/pull/2784)) +- Update django to 3.0.10 ([#2785](https://github.com/cookiecutter/cookiecutter-django/pull/2785)) +- Update sphinx-autobuild to 2020.9.1 ([#2782](https://github.com/cookiecutter/cookiecutter-django/pull/2782)) +- Update django-extensions to 3.0.6 ([#2783](https://github.com/cookiecutter/cookiecutter-django/pull/2783)) ## [2020-08-31] ### Updated -- Update sh to 1.14.0 ([#2779](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2779)) -- Update sentry-sdk to 0.17.1 ([#2778](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2778)) +- Update sh to 1.14.0 ([#2779](https://github.com/cookiecutter/cookiecutter-django/pull/2779)) +- Update sentry-sdk to 0.17.1 ([#2778](https://github.com/cookiecutter/cookiecutter-django/pull/2778)) ## [2020-04-13] ### Changed - Updated to Python 3.8 (@codnee) -- Moved converage config in setup.cfg (@danihodovic) +- Moved coverage config in setup.cfg (@danihodovic) ## [2020-04-08] ### Fixed @@ -707,7 +1240,7 @@ All enhancements and patches to Cookiecutter Django will be documented in this f ## [2020-04-04] ### Fixed -- Added compress command command with Django compressor (@gwiskur) +- Added compress command with Django compressor (@gwiskur) ## [2020-03-23] ### Changed @@ -801,7 +1334,7 @@ All enhancements and patches to Cookiecutter Django will be documented in this f ### Removed - Remove the user list view (@browniebroke) -### Fixed +### Fixed - Static storage default ACL (@browniebroke) ## [2019-05-17] @@ -837,7 +1370,7 @@ All enhancements and patches to Cookiecutter Django will be documented in this f ## [2019-03-11] ### Changed - Sentry integration from Raven to Sentry-SDK (@gfabricio) -- Made Redis config conditional on Celery locally (@demestav) +- Made Redis config conditional on Celery locally (@demestav) ## [2019-03-11] ### Added @@ -906,7 +1439,7 @@ All enhancements and patches to Cookiecutter Django will be documented in this f ### Changed - Test commands to use pytest (@jcass77) -### Removed +### Removed - Some hacks leftovers from Bootstrap v4 beta in `project.js` (@hendrikschneider) ## [2018-07-12] @@ -1008,7 +1541,7 @@ All enhancements and patches to Cookiecutter Django will be documented in this f - Rename `MIDDLEWARE_CLASSES` to `MIDDLEWARE` to enable support to [new style middleware](https://github.com/django/deps/blob/master/final/0005-improved-middleware.rst) introduced in Django 1.10 (@luzfcb) - New setting `MAILGUN_SENDER_DOMAIN` to allow sending mail from any domain other than those registered with mailgun (@jangeador) - add `urlpatterns` configuration to django-debug-toolbar, because the automatic configuration of `urlpatterns` was removed from django-debug-toolbar (@luzfcb) -- Added Temporary workaround on `requirements/local.txt` to fix django-debug-toolbar issue: https://github.com/pydanny/cookiecutter-django/issues/827 (@luzfcb) +- Added Temporary workaround on `requirements/local.txt` to fix django-debug-toolbar issue: https://github.com/cookiecutter/cookiecutter-django/issues/827 (@luzfcb) ### Changed - Upgrade to Django 1.10.1 (@luzfcb) @@ -1154,7 +1687,7 @@ d changed 'admin' url on `config/urls.py`, to stay the same as generated by djan ### [2016-05-01] ### Changed -- Restored the Pycharm project configuration files, that was accidentally removed in [15f350f](https://github.com/pydanny/cookiecutter-django/commit/15f350f05e2b49b4bdff0bdaa2b2ff260606e0f6) (@luzfcb @Newton715) +- Restored the Pycharm project configuration files, that was accidentally removed in [15f350f](https://github.com/cookiecutter/cookiecutter-django/commit/15f350f05e2b49b4bdff0bdaa2b2ff260606e0f6) (@luzfcb @Newton715) ### [2016-04-30] ### Changed @@ -1278,7 +1811,7 @@ d changed 'admin' url on `config/urls.py`, to stay the same as generated by djan ## [2016-02-15] ### Changed - In `users` app adapter, fix `is_open_for_signup` missing parameter (@oryx2) -- Fixes and improvements in Hitch tests , see [#485](https://github.com/pydanny/cookiecutter-django/pull/485) (@crdoconnor) +- Fixes and improvements in Hitch tests , see [#485](https://github.com/cookiecutter/cookiecutter-django/pull/485) (@crdoconnor) ## [2016-02-12] diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..a9d5b088f --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,42 @@ +# How to Contribute + +Always happy to get issues identified and pull requests! + +## Getting your pull request merged in + +1. Keep it small. The smaller the pull request, the more likely we are to accept. +2. Pull requests that fix a current issue get priority for review. + +## Testing + +### Installation + +Please install [tox](https://tox.readthedocs.io/en/latest/), which is a generic virtualenv management and test command line tool. + +[tox](https://tox.readthedocs.io/en/latest/) is available for download from [PyPI](https://pypi.python.org/pypi) via [pip](https://pypi.python.org/pypi/pip/): + + $ pip install tox + +It will automatically create a fresh virtual environment and install our test dependencies, +such as [pytest-cookies](https://pypi.python.org/pypi/pytest-cookies/) and [flake8](https://pypi.python.org/pypi/flake8/). + +### Run the Tests + +Tox uses pytest under the hood, hence it supports the same syntax for selecting tests. + +For further information please consult the [pytest usage docs](https://pytest.org/latest/usage.html#specifying-tests-selecting-tests). + +To run all tests using various versions of python in virtualenvs defined in tox.ini, just run tox.: + + $ tox + +It is possible to test with a specific version of python. To do this, the command +is: + + $ tox -e py39 + +This will run pytest with the python3.9 interpreter, for example. + +To run a particular test with tox for against your current Python version: + + $ tox -e py -- -k test_default_configuration diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst deleted file mode 100644 index d4412b7f0..000000000 --- a/CONTRIBUTING.rst +++ /dev/null @@ -1,54 +0,0 @@ -How to Contribute -================= - -Always happy to get issues identified and pull requests! - -Getting your pull request merged in ------------------------------------- - -#. Keep it small. The smaller the pull request the more likely I'll pull it in. -#. Pull requests that fix a current issue get priority for review. - -Testing -------- - -Installation -~~~~~~~~~~~~ - -Please install `tox`_, which is a generic virtualenv management and test command line tool. - -`tox`_ is available for download from `PyPI`_ via `pip`_:: - - $ pip install tox - -It will automatically create a fresh virtual environment and install our test dependencies, -such as `pytest-cookies`_ and `flake8`_. - -Run the Tests -~~~~~~~~~~~~~ - -Tox uses py.test under the hood, hence it supports the same syntax for selecting tests. - -For further information please consult the `pytest usage docs`_. - -To run all tests using various versions of python in virtualenvs defined in tox.ini, just run tox.:: - - $ tox - -It is possible to test with a specific version of python. To do this, the command -is:: - - $ tox -e py39 - -This will run py.test with the python3.9 interpreter, for example. - -To run a particular test with tox for against your current Python version:: - - $ tox -e py -- -k test_default_configuration - -.. _`pytest usage docs`: https://pytest.org/latest/usage.html#specifying-tests-selecting-tests -.. _`tox`: https://tox.readthedocs.io/en/latest/ -.. _`pip`: https://pypi.python.org/pypi/pip/ -.. _`pytest-cookies`: https://pypi.python.org/pypi/pytest-cookies/ -.. _`flake8`: https://pypi.python.org/pypi/flake8/ -.. _`PyPI`: https://pypi.python.org/pypi diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 77b548863..d31b480a6 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -131,6 +131,13 @@ Listed in alphabetical order. Qoyyuum + + Abdullah Adeel + + mabdullahadeel + + abdadeel_ + Adam Bogdał @@ -348,6 +355,13 @@ Listed in alphabetical order. + + Bogdan Mateescu + + mateesville93 + + + Bouke Haarsma @@ -390,6 +404,20 @@ Listed in alphabetical order. + + Chao Yang Wu + + goatwu1993 + + + + + Charlie Macfarlane Brodie + + tannart + + + Charlie Smith @@ -495,6 +523,13 @@ Listed in alphabetical order. + + dalrrard + + dalrrard + + + Dan Shultz @@ -600,6 +635,13 @@ Listed in alphabetical order. purplediane88 + + Diego Montes + + d57montes + + + Dong Huynh @@ -607,6 +649,13 @@ Listed in alphabetical order. + + Douglas + + douglascdev + + + Duda Nogueira @@ -684,6 +733,20 @@ Listed in alphabetical order. windrush + + Floyd Hightower + + fhightower + + + + + Fuzzwah + + Fuzzwah + + + Gabriel Mejia @@ -1055,6 +1118,13 @@ Listed in alphabetical order. + + Liam Brenner + + SableWalnut + + + Lin Xianyi @@ -1090,6 +1160,13 @@ Listed in alphabetical order. flyudvik + + Manjit Pardeshi + + Manjit2003 + + + Martin Blech @@ -1174,6 +1251,13 @@ Listed in alphabetical order. + + Meraj + + ichbinmeraj + + merajsafari + Mesut Yılmaz @@ -1223,6 +1307,13 @@ Listed in alphabetical order. + + mpoli + + mpoli + + + Nico Stefani @@ -1230,6 +1321,13 @@ Listed in alphabetical order. moby_dick91 + + Noah H + + nthall + + + Oleg Russkin @@ -1258,6 +1356,13 @@ Listed in alphabetical order. + + Pedro Campos + + pcampos119104 + + + Peter Bittner @@ -1447,6 +1552,13 @@ Listed in alphabetical order. + + Thibault J. + + thibault + + thibault + Théo Segonds @@ -1468,6 +1580,13 @@ Listed in alphabetical order. + + Timm Simpkins + + PoDuck + + + Tom Atkins @@ -1524,6 +1643,13 @@ Listed in alphabetical order. highcenburg + + Vikas Yadav + + vik-y + + + Vitaly Babiy @@ -1559,6 +1685,13 @@ Listed in alphabetical order. g01dhand + + Will Gordon + + wgordon17 + + + William Archinal @@ -1594,6 +1727,13 @@ Listed in alphabetical order. + + Zach Borboa + + zachborboa + + + ### Special Thanks diff --git a/README.md b/README.md new file mode 100644 index 000000000..3f5df1f01 --- /dev/null +++ b/README.md @@ -0,0 +1,252 @@ +# Cookiecutter Django + +[![Build Status](https://img.shields.io/github/workflow/status/cookiecutter/cookiecutter-django/CI/master)](https://github.com/cookiecutter/cookiecutter-django/actions?query=workflow%3ACI) +[![Documentation Status](https://readthedocs.org/projects/cookiecutter-django/badge/?version=latest)](https://cookiecutter-django.readthedocs.io/en/latest/?badge=latest) +[![Updates](https://pyup.io/repos/github/cookiecutter/cookiecutter-django/shield.svg)](https://pyup.io/repos/github/cookiecutter/cookiecutter-django/) +[![Join our Discord](https://img.shields.io/badge/Discord-cookiecutter-5865F2?style=flat&logo=discord&logoColor=white)](https://discord.gg/9BrxzPKuEW) +[![Code Helpers Badge](https://www.codetriage.com/cookiecutter/cookiecutter-django/badges/users.svg)](https://www.codetriage.com/cookiecutter/cookiecutter-django) +[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black) + +Powered by [Cookiecutter](https://github.com/cookiecutter/cookiecutter), Cookiecutter Django is a framework for jumpstarting +production-ready Django projects quickly. + +- Documentation: +- See [Troubleshooting](https://cookiecutter-django.readthedocs.io/en/latest/troubleshooting.html) for common errors and obstacles +- If you have problems with Cookiecutter Django, please open [issues](https://github.com/cookiecutter/cookiecutter-django/issues/new) don't send + emails to the maintainers. + +## Features + +- For Django 3.2 +- Works with Python 3.9 +- Renders Django projects with 100% starting test coverage +- Twitter [Bootstrap](https://github.com/twbs/bootstrap) v5 +- [12-Factor](http://12factor.net/) based settings via [django-environ](https://github.com/joke2k/django-environ) +- Secure by default. We believe in SSL. +- Optimized development and production settings +- Registration via [django-allauth](https://github.com/pennersr/django-allauth) +- Comes with custom user model ready to go +- Optional basic ASGI setup for Websockets +- Optional custom static build using Gulp and livereload +- Send emails via [Anymail](https://github.com/anymail/django-anymail) (using [Mailgun](http://www.mailgun.com/) by default or Amazon SES if AWS is selected cloud provider, but switchable) +- Media storage using Amazon S3 or Google Cloud Storage +- Docker support using [docker-compose](https://github.com/docker/compose) for development and production (using [Traefik](https://traefik.io/) with [LetsEncrypt](https://letsencrypt.org/) support) +- [Procfile](https://devcenter.heroku.com/articles/procfile) for deploying to Heroku +- Instructions for deploying to [PythonAnywhere](https://www.pythonanywhere.com/) +- Run tests with unittest or pytest +- Customizable PostgreSQL version +- Default integration with [pre-commit](https://github.com/pre-commit/pre-commit) for identifying simple issues before submission to code review + +## Optional Integrations + +*These features can be enabled during initial project setup.* + +- Serve static files from Amazon S3, Google Cloud Storage or [Whitenoise](https://whitenoise.readthedocs.io/) +- Configuration for [Celery](http://www.celeryproject.org/) and [Flower](https://github.com/mher/flower) (the latter in Docker setup only) +- Integration with [MailHog](https://github.com/mailhog/MailHog) for local email testing +- Integration with [Sentry](https://sentry.io/welcome/) for error logging + +## Constraints + +- Only maintained 3rd party libraries are used. +- Uses PostgreSQL everywhere: 10.19 - 14.1 ([MySQL fork](https://github.com/mabdullahadeel/cookiecutter-django-mysql) also available). +- Environment variables for configuration (This won't work with Apache/mod_wsgi). + +## Support this Project! + +This project is run by volunteers. Please support them in their efforts to maintain and improve Cookiecutter Django: + +- Daniel Roy Greenfeld, Project Lead ([GitHub](https://github.com/pydanny), [Patreon](https://www.patreon.com/danielroygreenfeld)): expertise in Django and AWS ELB. +- Nikita Shupeyko, Core Developer ([GitHub](https://github.com/webyneter)): expertise in Python/Django, hands-on DevOps and frontend experience. + +Projects that provide financial support to the maintainers: + +------------------------------------------------------------------------ + +

+ +

+ +Two Scoops of Django 3.x is the best ice cream-themed Django reference in the universe! + +### PyUp + +

+ +

+ +PyUp brings you automated security and dependency updates used by Google and other organizations. Free for open source projects! + +## Usage + +Let's pretend you want to create a Django project called "redditclone". Rather than using `startproject` +and then editing the results to include your name, email, and various configuration issues that always get forgotten until the worst possible moment, get [cookiecutter](https://github.com/cookiecutter/cookiecutter) to do all the work. + +First, get Cookiecutter. Trust me, it's awesome: + + $ pip install "cookiecutter>=1.7.0" + +Now run it against this repo: + + $ cookiecutter https://github.com/cookiecutter/cookiecutter-django + +You'll be prompted for some values. Provide them, then a Django project will be created for you. + +**Warning**: After this point, change 'Daniel Greenfeld', 'pydanny', etc to your own information. + +Answer the prompts with your own desired [options](http://cookiecutter-django.readthedocs.io/en/latest/project-generation-options.html). For example: + + Cloning into 'cookiecutter-django'... + remote: Counting objects: 550, done. + remote: Compressing objects: 100% (310/310), done. + remote: Total 550 (delta 283), reused 479 (delta 222) + Receiving objects: 100% (550/550), 127.66 KiB | 58 KiB/s, done. + Resolving deltas: 100% (283/283), done. + project_name [My Awesome Project]: Reddit Clone + project_slug [reddit_clone]: reddit + description [Behold My Awesome Project!]: A reddit clone. + author_name [Daniel Roy Greenfeld]: Daniel Greenfeld + domain_name [example.com]: myreddit.com + email [daniel-greenfeld@example.com]: pydanny@gmail.com + version [0.1.0]: 0.0.1 + Select open_source_license: + 1 - MIT + 2 - BSD + 3 - GPLv3 + 4 - Apache Software License 2.0 + 5 - Not open source + Choose from 1, 2, 3, 4, 5 [1]: 1 + timezone [UTC]: America/Los_Angeles + windows [n]: n + use_pycharm [n]: y + use_docker [n]: n + Select postgresql_version: + 1 - 14.1 + 2 - 13.5 + 3 - 12.9 + 4 - 11.14 + 5 - 10.19 + Choose from 1, 2, 3, 4, 5 [1]: 1 + Select js_task_runner: + 1 - None + 2 - Gulp + Choose from 1, 2 [1]: 1 + Select cloud_provider: + 1 - AWS + 2 - GCP + 3 - None + Choose from 1, 2, 3 [1]: 1 + Select mail_service: + 1 - Mailgun + 2 - Amazon SES + 3 - Mailjet + 4 - Mandrill + 5 - Postmark + 6 - Sendgrid + 7 - SendinBlue + 8 - SparkPost + 9 - Other SMTP + Choose from 1, 2, 3, 4, 5, 6, 7, 8, 9 [1]: 1 + use_async [n]: n + use_drf [n]: y + custom_bootstrap_compilation [n]: n + use_compressor [n]: n + use_celery [n]: y + use_mailhog [n]: n + use_sentry [n]: y + use_whitenoise [n]: n + use_heroku [n]: y + Select ci_tool: + 1 - None + 2 - Travis + 3 - Gitlab + 4 - Github + Choose from 1, 2, 3, 4 [1]: 4 + keep_local_envs_in_vcs [y]: y + debug [n]: n + +Enter the project and take a look around: + + $ cd reddit/ + $ ls + +Create a git repo and push it there: + + $ git init + $ git add . + $ git commit -m "first awesome commit" + $ git remote add origin git@github.com:pydanny/redditclone.git + $ git push -u origin master + +Now take a look at your repo. Don't forget to carefully look at the generated README. Awesome, right? + +For local development, see the following: + +- [Developing locally](http://cookiecutter-django.readthedocs.io/en/latest/developing-locally.html) +- [Developing locally using docker](http://cookiecutter-django.readthedocs.io/en/latest/developing-locally-docker.html) + +## Community + +- Have questions? **Before you ask questions anywhere else**, please post your question on [Stack Overflow](http://stackoverflow.com/questions/tagged/cookiecutter-django) under the *cookiecutter-django* tag. We check there periodically for questions. +- If you think you found a bug or want to request a feature, please open an [issue](https://github.com/cookiecutter/cookiecutter-django/issues). +- For anything else, you can chat with us on [Discord](https://discord.gg/9BrxzPKuEW). + +## For Readers of Two Scoops of Django + +You may notice that some elements of this project do not exactly match what we describe in chapter 3. The reason for that is this project, amongst other things, serves as a test bed for trying out new ideas and concepts. Sometimes they work, sometimes they don't, but the end result is that it won't necessarily match precisely what is described in the book I co-authored. + +## For PyUp Users + +If you are using [PyUp](https://pyup.io) to keep your dependencies updated and secure, use the code *cookiecutter* during checkout to get 15% off every month. + +## "Your Stuff" + +Scattered throughout the Python and HTML of this project are places marked with "your stuff". This is where third-party libraries are to be integrated with your project. + +## For MySQL users +To get full MySQL support in addition to the default Postgresql, you can use this fork of the cookiecutter-django: +https://github.com/mabdullahadeel/cookiecutter-django-mysql + +## Releases + +Need a stable release? You can find them at + +## Not Exactly What You Want? + +This is what I want. *It might not be what you want.* Don't worry, you have options: + +### Fork This + +If you have differences in your preferred setup, I encourage you to fork this to create your own version. +Once you have your fork working, let me know and I'll add it to a '*Similar Cookiecutter Templates*' list here. +It's up to you whether to rename your fork. + +If you do rename your fork, I encourage you to submit it to the following places: + +- [cookiecutter](https://github.com/cookiecutter/cookiecutter) so it gets listed in the README as a template. +- The cookiecutter [grid](https://www.djangopackages.com/grids/g/cookiecutters/) on Django Packages. + +### Submit a Pull Request + +We accept pull requests if they're small, atomic, and make our own project development +experience better. + +## Articles + +- [Using cookiecutter-django with Google Cloud Storage](https://ahhda.github.io/cloud/gce/django/2019/03/12/using-django-cookiecutter-cloud-storage.html) - Mar. 12, 2019 +- [cookiecutter-django with Nginx, Route 53 and ELB](https://msaizar.com/blog/cookiecutter-django-nginx-route-53-and-elb/) - Feb. 12, 2018 +- [cookiecutter-django and Amazon RDS](https://msaizar.com/blog/cookiecutter-django-and-amazon-rds/) - Feb. 7, 2018 +- [Using Cookiecutter to Jumpstart a Django Project on Windows with PyCharm](https://joshuahunter.com/posts/using-cookiecutter-to-jumpstart-a-django-project-on-windows-with-pycharm/) - May 19, 2017 +- [Exploring with Cookiecutter](http://www.snowboardingcoder.com/django/2016/12/03/exploring-with-cookiecutter/) - Dec. 3, 2016 +- [Introduction to Cookiecutter-Django](http://krzysztofzuraw.com/blog/2016/django-cookiecutter.html) - Feb. 19, 2016 +- [Django and GitLab - Running Continuous Integration and tests with your FREE account](http://dezoito.github.io/2016/05/11/django-gitlab-continuous-integration-phantomjs.html) - May. 11, 2016 +- [Development and Deployment of Cookiecutter-Django on Fedora](https://realpython.com/blog/python/development-and-deployment-of-cookiecutter-django-on-fedora/) - Jan. 18, 2016 +- [Development and Deployment of Cookiecutter-Django via Docker](https://realpython.com/blog/python/development-and-deployment-of-cookiecutter-django-via-docker/) - Dec. 29, 2015 +- [How to create a Django Application using Cookiecutter and Django 1.8](https://www.swapps.io/blog/how-to-create-a-django-application-using-cookiecutter-and-django-1-8/) - Sept. 12, 2015 + +Have a blog or online publication? Write about your cookiecutter-django tips and tricks, then send us a pull request with the link. + +## Code of Conduct + +Everyone interacting in the Cookiecutter project's codebases, issue trackers, chat +rooms, and mailing lists is expected to follow the [PyPA Code of Conduct](https://www.pypa.io/en/latest/code-of-conduct/). diff --git a/README.rst b/README.rst deleted file mode 100644 index 8c420b8c8..000000000 --- a/README.rst +++ /dev/null @@ -1,326 +0,0 @@ -Cookiecutter Django -=================== - -.. image:: https://img.shields.io/github/workflow/status/pydanny/cookiecutter-django/CI/master - :target: https://github.com/pydanny/cookiecutter-django/actions?query=workflow%3ACI - :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 - -.. image:: https://img.shields.io/badge/cookiecutter-Join%20on%20Slack-green?style=flat&logo=slack - :target: https://join.slack.com/t/cookie-cutter/shared_invite/enQtNzI0Mzg5NjE5Nzk5LTRlYWI2YTZhYmQ4YmU1Y2Q2NmE1ZjkwOGM0NDQyNTIwY2M4ZTgyNDVkNjMxMDdhZGI5ZGE5YmJjM2M3ODJlY2U - -.. image:: https://www.codetriage.com/pydanny/cookiecutter-django/badges/users.svg - :target: https://www.codetriage.com/pydanny/cookiecutter-django - :alt: Code Helpers Badge - -.. image:: https://img.shields.io/badge/code%20style-black-000000.svg - :target: https://github.com/ambv/black - :alt: Code style: black - -Powered by Cookiecutter_, Cookiecutter Django is a framework for jumpstarting -production-ready Django projects quickly. - -* Documentation: https://cookiecutter-django.readthedocs.io/en/latest/ -* See Troubleshooting_ for common errors and obstacles -* If you have problems with Cookiecutter Django, please open issues_ don't send - emails to the maintainers. - -.. _Troubleshooting: https://cookiecutter-django.readthedocs.io/en/latest/troubleshooting.html - -.. _528: https://github.com/pydanny/cookiecutter-django/issues/528#issuecomment-212650373 -.. _issues: https://github.com/pydanny/cookiecutter-django/issues/new - -Features ---------- - -* For Django 3.1 -* Works with Python 3.9 -* Renders Django projects with 100% starting test coverage -* Twitter Bootstrap_ v4 (`maintained Foundation fork`_ also available) -* 12-Factor_ based settings via django-environ_ -* Secure by default. We believe in SSL. -* Optimized development and production settings -* Registration via django-allauth_ -* Comes with custom user model ready to go -* Optional basic ASGI setup for Websockets -* Optional custom static build using Gulp and livereload -* Send emails via Anymail_ (using Mailgun_ by default or Amazon SES if AWS is selected cloud provider, but switchable) -* Media storage using Amazon S3, Google Cloud Storage, or a local nginx docker instance -* Docker support using docker-compose_ for development and production (using Traefik_ with LetsEncrypt_ support) -* Procfile_ for deploying to Heroku -* Instructions for deploying to PythonAnywhere_ -* Run tests with unittest or pytest -* Customizable PostgreSQL version -* Default integration with pre-commit_ for identifying simple issues before submission to code review - -.. _`maintained Foundation fork`: https://github.com/Parbhat/cookiecutter-django-foundation - - -Optional Integrations ---------------------- - -*These features can be enabled during initial project setup.* - -* Serve static files from Amazon S3, Google Cloud Storage or Whitenoise_ -* Configuration for Celery_ and Flower_ (the latter in Docker setup only) -* Integration with MailHog_ for local email testing -* Integration with Sentry_ for error logging - -.. _Bootstrap: https://github.com/twbs/bootstrap -.. _django-environ: https://github.com/joke2k/django-environ -.. _12-Factor: http://12factor.net/ -.. _django-allauth: https://github.com/pennersr/django-allauth -.. _django-avatar: https://github.com/grantmcconnaughey/django-avatar -.. _Procfile: https://devcenter.heroku.com/articles/procfile -.. _Mailgun: http://www.mailgun.com/ -.. _Whitenoise: https://whitenoise.readthedocs.io/ -.. _Celery: http://www.celeryproject.org/ -.. _Flower: https://github.com/mher/flower -.. _Anymail: https://github.com/anymail/django-anymail -.. _MailHog: https://github.com/mailhog/MailHog -.. _Sentry: https://sentry.io/welcome/ -.. _docker-compose: https://github.com/docker/compose -.. _PythonAnywhere: https://www.pythonanywhere.com/ -.. _Traefik: https://traefik.io/ -.. _LetsEncrypt: https://letsencrypt.org/ -.. _pre-commit: https://github.com/pre-commit/pre-commit - -Constraints ------------ - -* Only maintained 3rd party libraries are used. -* Uses PostgreSQL everywhere (10.16 - 13.2) -* Environment variables for configuration (This won't work with Apache/mod_wsgi). - -Support this Project! ----------------------- - -This project is run by volunteers. Please support them in their efforts to maintain and improve Cookiecutter Django: - -* Daniel Roy Greenfeld, Project Lead (`GitHub `_, `Patreon `_): expertise in Django and AWS ELB. - -* Nikita Shupeyko, Core Developer (`GitHub `_): expertise in Python/Django, hands-on DevOps and frontend experience. - -Projects that provide financial support to the maintainers: - - - -~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. 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: Two Scoops of Django - :target: https://www.feldroy.com/products//two-scoops-of-django-3-x - -Two Scoops of Django 3.x is the best ice cream-themed Django reference in the universe! - -pyup -~~~~~~~~~~~~~~~~~~ - -.. image:: https://pyup.io/static/images/logo.png - :name: pyup - :align: center - :alt: pyup - :target: https://pyup.io/ - -Pyup brings you automated security and dependency updates used by Google and other organizations. Free for open source projects! - -Usage ------- - -Let's pretend you want to create a Django project called "redditclone". Rather than using ``startproject`` -and then editing the results to include your name, email, and various configuration issues that always get forgotten until the worst possible moment, get cookiecutter_ to do all the work. - -First, get Cookiecutter. Trust me, it's awesome:: - - $ pip install "cookiecutter>=1.7.0" - -Now run it against this repo:: - - $ cookiecutter https://github.com/pydanny/cookiecutter-django - -You'll be prompted for some values. Provide them, then a Django project will be created for you. - -**Warning**: After this point, change 'Daniel Greenfeld', 'pydanny', etc to your own information. - -Answer the prompts with your own desired options_. For example:: - - Cloning into 'cookiecutter-django'... - remote: Counting objects: 550, done. - remote: Compressing objects: 100% (310/310), done. - remote: Total 550 (delta 283), reused 479 (delta 222) - Receiving objects: 100% (550/550), 127.66 KiB | 58 KiB/s, done. - Resolving deltas: 100% (283/283), done. - project_name [Project Name]: Reddit Clone - project_slug [reddit_clone]: reddit - author_name [Daniel Roy Greenfeld]: Daniel Greenfeld - email [you@example.com]: pydanny@gmail.com - description [Behold My Awesome Project!]: A reddit clone. - domain_name [example.com]: myreddit.com - version [0.1.0]: 0.0.1 - timezone [UTC]: America/Los_Angeles - use_whitenoise [n]: n - use_celery [n]: y - use_mailhog [n]: n - use_sentry [n]: y - use_pycharm [n]: y - windows [n]: n - use_docker [n]: n - use_heroku [n]: y - use_compressor [n]: y - Select postgresql_version: - 1 - 13.2 - 2 - 12.6 - 3 - 11.11 - 4 - 10.16 - Choose from 1, 2, 3, 4, 5 [1]: 1 - Select js_task_runner: - 1 - None - 2 - Gulp - Choose from 1, 2 [1]: 1 - Select cloud_provider: - 1 - AWS - 2 - GCP - 3 - nginx - 4 - None - Choose from 1, 2, 3, 4 [1]: 1 - use_nginx_for_serve_media_files[n]: n - custom_bootstrap_compilation [n]: n - Select open_source_license: - 1 - MIT - 2 - BSD - 3 - GPLv3 - 4 - Apache Software License 2.0 - 5 - Not open source - Choose from 1, 2, 3, 4, 5 [1]: 1 - keep_local_envs_in_vcs [y]: y - debug[n]: n - -Enter the project and take a look around:: - - $ cd reddit/ - $ ls - -Create a git repo and push it there:: - - $ git init - $ git add . - $ git commit -m "first awesome commit" - $ git remote add origin git@github.com:pydanny/redditclone.git - $ git push -u origin master - -Now take a look at your repo. Don't forget to carefully look at the generated README. Awesome, right? - -For local development, see the following: - -* `Developing locally`_ -* `Developing locally using docker`_ - -.. _options: http://cookiecutter-django.readthedocs.io/en/latest/project-generation-options.html -.. _`Developing locally`: http://cookiecutter-django.readthedocs.io/en/latest/developing-locally.html -.. _`Developing locally using docker`: http://cookiecutter-django.readthedocs.io/en/latest/developing-locally-docker.html - -Community ------------ - -* Have questions? **Before you ask questions anywhere else**, please post your question on `Stack Overflow`_ under the *cookiecutter-django* tag. We check there periodically for questions. -* If you think you found a bug or want to request a feature, please open an issue_. -* For anything else, you can chat with us on `Slack`_. - -.. _`Stack Overflow`: http://stackoverflow.com/questions/tagged/cookiecutter-django -.. _`issue`: https://github.com/pydanny/cookiecutter-django/issues -.. _`Slack`: https://join.slack.com/t/cookie-cutter/shared_invite/enQtNzI0Mzg5NjE5Nzk5LTRlYWI2YTZhYmQ4YmU1Y2Q2NmE1ZjkwOGM0NDQyNTIwY2M4ZTgyNDVkNjMxMDdhZGI5ZGE5YmJjM2M3ODJlY2U - -For Readers of Two Scoops of Django --------------------------------------------- - -You may notice that some elements of this project do not exactly match what we describe in chapter 3. The reason for that is this project, amongst other things, serves as a test bed for trying out new ideas and concepts. Sometimes they work, sometimes they don't, but the end result is that it won't necessarily match precisely what is described in the book I co-authored. - -For pyup.io Users ------------------ - -If you are using `pyup.io`_ to keep your dependencies updated and secure, use the code *cookiecutter* during checkout to get 15% off every month. - -.. _`pyup.io`: https://pyup.io - -"Your Stuff" -------------- - -Scattered throughout the Python and HTML of this project are places marked with "your stuff". This is where third-party libraries are to be integrated with your project. - -Releases --------- - -Need a stable release? You can find them at https://github.com/pydanny/cookiecutter-django/releases - - -Not Exactly What You Want? ---------------------------- - -This is what I want. *It might not be what you want.* Don't worry, you have options: - -Fork This -~~~~~~~~~~ - -If you have differences in your preferred setup, I encourage you to fork this to create your own version. -Once you have your fork working, let me know and I'll add it to a '*Similar Cookiecutter Templates*' list here. -It's up to you whether or not to rename your fork. - -If you do rename your fork, I encourage you to submit it to the following places: - -* cookiecutter_ so it gets listed in the README as a template. -* The cookiecutter grid_ on Django Packages. - -.. _cookiecutter: https://github.com/cookiecutter/cookiecutter -.. _grid: https://www.djangopackages.com/grids/g/cookiecutters/ - -Submit a Pull Request -~~~~~~~~~~~~~~~~~~~~~~ - -We accept pull requests if they're small, atomic, and make our own project development -experience better. - -Articles ---------- - -* `Using cookiecutter-django with Google Cloud Storage`_ - Mar. 12, 2019 -* `cookiecutter-django with Nginx, Route 53 and ELB`_ - Feb. 12, 2018 -* `cookiecutter-django and Amazon RDS`_ - Feb. 7, 2018 -* `Using Cookiecutter to Jumpstart a Django Project on Windows with PyCharm`_ - May 19, 2017 -* `Exploring with Cookiecutter`_ - Dec. 3, 2016 -* `Introduction to Cookiecutter-Django`_ - Feb. 19, 2016 -* `Django and GitLab - Running Continuous Integration and tests with your FREE account`_ - May. 11, 2016 -* `Development and Deployment of Cookiecutter-Django on Fedora`_ - Jan. 18, 2016 -* `Development and Deployment of Cookiecutter-Django via Docker`_ - Dec. 29, 2015 -* `How to create a Django Application using Cookiecutter and Django 1.8`_ - Sept. 12, 2015 - -Have a blog or online publication? Write about your cookiecutter-django tips and tricks, then send us a pull request with the link. - -.. _`Using cookiecutter-django with Google Cloud Storage`: https://ahhda.github.io/cloud/gce/django/2019/03/12/using-django-cookiecutter-cloud-storage.html -.. _`cookiecutter-django with Nginx, Route 53 and ELB`: https://msaizar.com/blog/cookiecutter-django-nginx-route-53-and-elb/ -.. _`cookiecutter-django and Amazon RDS`: https://msaizar.com/blog/cookiecutter-django-and-amazon-rds/ -.. _`Exploring with Cookiecutter`: http://www.snowboardingcoder.com/django/2016/12/03/exploring-with-cookiecutter/ -.. _`Using Cookiecutter to Jumpstart a Django Project on Windows with PyCharm`: https://joshuahunter.com/posts/using-cookiecutter-to-jumpstart-a-django-project-on-windows-with-pycharm/ - -.. _`Development and Deployment of Cookiecutter-Django via Docker`: https://realpython.com/blog/python/development-and-deployment-of-cookiecutter-django-via-docker/ -.. _`Development and Deployment of Cookiecutter-Django on Fedora`: https://realpython.com/blog/python/development-and-deployment-of-cookiecutter-django-on-fedora/ -.. _`How to create a Django Application using Cookiecutter and Django 1.8`: https://www.swapps.io/blog/how-to-create-a-django-application-using-cookiecutter-and-django-1-8/ -.. _`Introduction to Cookiecutter-Django`: http://krzysztofzuraw.com/blog/2016/django-cookiecutter.html -.. _`Django and GitLab - Running Continuous Integration and tests with your FREE account`: http://dezoito.github.io/2016/05/11/django-gitlab-continuous-integration-phantomjs.html - -Code of Conduct ---------------- - -Everyone interacting in the Cookiecutter project's codebases, issue trackers, chat -rooms, and mailing lists is expected to follow the `PyPA Code of Conduct`_. - - -.. _`PyPA Code of Conduct`: https://www.pypa.io/en/latest/code-of-conduct/ diff --git a/cookiecutter.json b/cookiecutter.json index 367ab775a..6d2e14daa 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -18,10 +18,11 @@ "use_pycharm": "n", "use_docker": "n", "postgresql_version": [ - "13.2", - "12.6", - "11.11", - "10.16" + "14.1", + "13.5", + "12.9", + "11.14", + "10.19" ], "js_task_runner": [ "None", diff --git a/docs/conf.py b/docs/conf.py index 469aa12d4..f55bcb819 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -7,10 +7,7 @@ # # All configuration values have a default; values that are commented out # serve to show the default. - from datetime import datetime -import os -import sys now = datetime.now() @@ -92,7 +89,7 @@ pygments_style = "sphinx" # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = "default" +html_theme = "sphinx_rtd_theme" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the @@ -242,7 +239,8 @@ texinfo_documents = [ "Cookiecutter Django documentation", "Daniel Roy Greenfeld", "Cookiecutter Django", - "A Cookiecutter template for creating production-ready Django projects quickly.", + "A Cookiecutter template for creating production-ready " + "Django projects quickly.", "Miscellaneous", ) ] diff --git a/docs/deployment-on-heroku.rst b/docs/deployment-on-heroku.rst index 0681a50ca..bab5881cd 100644 --- a/docs/deployment-on-heroku.rst +++ b/docs/deployment-on-heroku.rst @@ -3,14 +3,14 @@ Deployment on Heroku .. index:: Heroku -Commands to run ---------------- +Script +------ Run these commands to deploy the project to Heroku: .. code-block:: bash - heroku create --buildpack heroku/python + heroku create --buildpack heroku/python heroku addons:create heroku-postgresql:hobby-dev # On Windows use double quotes for the time zone, e.g. @@ -20,6 +20,7 @@ Run these commands to deploy the project to Heroku: heroku addons:create heroku-redis:hobby-dev + # Assuming you chose Mailgun as mail service (see below for others) heroku addons:create mailgun:starter heroku config:set PYTHONHASHSEED=random @@ -53,11 +54,25 @@ Run these commands to deploy the project to Heroku: heroku open +Notes +----- + +Email Service ++++++++++++++ + +The script above assumes that you've chose Mailgun as email service. If you want to use another one, check the `documentation for django-anymail `_ to know which environment variables to set. Heroku provides other `add-ons for emails `_ (e.g. Sendgrid) which can be configured with a similar one line command. .. warning:: .. include:: mailgun.rst +Heroku & Docker ++++++++++++++++ + +Although Heroku has some sort of `Docker support`_, it's not supported by cookiecutter-django. +We invite you to follow Heroku documentation about it. + +.. _Docker support: https://devcenter.heroku.com/articles/build-docker-images-heroku-yml Optional actions ---------------- @@ -110,12 +125,4 @@ which runs Gulp in cookiecutter-django. If things don't work, please refer to the Heroku docs. -.. _multiple buildpacks: https://devcenter.heroku.com/articles/using-multiple-buildpacks-for-an-app - -About Heroku & Docker ---------------------- - -Although Heroku has some sort of `Docker support`_, it's not supported by cookiecutter-django. -We invite you to follow Heroku documentation about it. - -.. _Docker support: https://devcenter.heroku.com/articles/build-docker-images-heroku-yml +.. _multiple buildpacks: https://devcenter.heroku.com/articles/using-multiple-buildpacks-for-an-app \ No newline at end of file diff --git a/docs/deployment-on-pythonanywhere.rst b/docs/deployment-on-pythonanywhere.rst index 67da158ba..f7bff12a4 100644 --- a/docs/deployment-on-pythonanywhere.rst +++ b/docs/deployment-on-pythonanywhere.rst @@ -15,7 +15,7 @@ Full instructions follow, but here's a high-level view. 2. Set your config variables in the *postactivate* script -3. Run the *manage.py* ``migrate`` and ``collectstatic`` {%- if cookiecutter.use_compressor == "y" %}and ``compress`` {%- endif %}commands +3. Run the *manage.py* ``migrate`` and ``collectstatic`` commands. If you've opted for django-compressor, also run ``compress`` 4. Add an entry to the PythonAnywhere *Web tab* @@ -25,7 +25,6 @@ Full instructions follow, but here's a high-level view. Once you've been through this one-off config, future deployments are much simpler: just ``git pull`` and then hit the "Reload" button :) - Getting your code and dependencies installed on PythonAnywhere -------------------------------------------------------------- @@ -39,7 +38,6 @@ Make sure your project is fully committed and pushed up to Bitbucket or Github o pip install -r requirements/production.txt # may take a few minutes - Setting environment variables in the console -------------------------------------------- @@ -57,7 +55,7 @@ Set environment variables via the virtualenv "postactivate" script (this will se vi $VIRTUAL_ENV/bin/postactivate -**TIP:** *If you don't like vi, you can also edit this file via the PythonAnywhere "Files" menu; look in the ".virtualenvs" folder*. +.. note:: If you don't like vi, you can also edit this file via the PythonAnywhere "Files" menu; look in the ".virtualenvs" folder. Add these exports @@ -73,13 +71,14 @@ Add these exports export DJANGO_AWS_ACCESS_KEY_ID= export DJANGO_AWS_SECRET_ACCESS_KEY= export DJANGO_AWS_STORAGE_BUCKET_NAME= - export DATABASE_URL='' + export DATABASE_URL='' + export REDIS_URL='' -**NOTE:** *The AWS details are not required if you're using whitenoise or the built-in pythonanywhere static files service, but you do need to set them to blank, as above.* +.. note:: The AWS details are not required if you're using whitenoise or the built-in pythonanywhere static files service, but you do need to set them to blank, as above. -Database setup: ---------------- +Database setup +-------------- Go to the PythonAnywhere **Databases tab** and configure your database. @@ -109,18 +108,26 @@ Now run the migration, and collectstatic: source $VIRTUAL_ENV/bin/postactivate python manage.py migrate python manage.py collectstatic - {%- if cookiecutter.use_compressor == "y" %}python manage.py compress {%- endif %} + # if using django-compressor: + python manage.py compress # and, optionally python manage.py createsuperuser +Redis +----- + +PythonAnywhere does NOT `offer a built-in solution `_ for Redis, however the production setup from Cookiecutter Django uses Redis as cache and requires one. + +We recommend to signup to a separate service offering hosted Redis (e.g. `Redislab `_) and use the URL they provide. + Configure the PythonAnywhere Web Tab ------------------------------------ Go to the PythonAnywhere **Web tab**, hit **Add new web app**, and choose **Manual Config**, and then the version of Python you used for your virtualenv. -**NOTE:** *If you're using a custom domain (not on \*.pythonanywhere.com), then you'll need to set up a CNAME with your domain registrar.* +.. note:: If you're using a custom domain (not on \*.pythonanywhere.com), then you'll need to set up a CNAME with your domain registrar. When you're redirected back to the web app config screen, set the **path to your virtualenv**. If you used virtualenvwrapper as above, you can just enter its name. @@ -153,15 +160,14 @@ Click through to the **WSGI configuration file** link (near the top) and edit th Back on the Web tab, hit **Reload**, and your app should be live! -**NOTE:** *you may see security warnings until you set up your SSL certificates. If you -want to suppress them temporarily, set DJANGO_SECURE_SSL_REDIRECT to blank. Follow -the instructions here to get SSL set up: https://help.pythonanywhere.com/pages/SSLOwnDomains/* +.. note:: You may see security warnings until you set up your SSL certificates. If you want to suppress them temporarily, set ``DJANGO_SECURE_SSL_REDIRECT`` to blank. Follow `these instructions `_ to get SSL set up. + Optional: static files ---------------------- -If you want to use the PythonAnywhere static files service instead of using whitenoise or S3, you'll find its configuration section on the Web tab. Essentially you'll need an entry to match your ``STATIC_URL`` and ``STATIC_ROOT`` settings. There's more info here: https://help.pythonanywhere.com/pages/DjangoStaticFiles +If you want to use the PythonAnywhere static files service instead of using whitenoise or S3, you'll find its configuration section on the Web tab. Essentially you'll need an entry to match your ``STATIC_URL`` and ``STATIC_ROOT`` settings. There's more info `in this article `_. Future deployments @@ -176,8 +182,9 @@ For subsequent deployments, the procedure is much simpler. In a Bash console: git pull python manage.py migrate python manage.py collectstatic - {%- if cookiecutter.use_compressor == "y" %}python manage.py compress {%- endif %} + # if using django-compressor: + python manage.py compress And then go to the Web tab and hit **Reload** -**TIP:** *if you're really keen, you can set up git-push based deployments: https://blog.pythonanywhere.com/87/* +.. note:: If you're really keen, you can set up git-push based deployments: https://blog.pythonanywhere.com/87/ diff --git a/docs/developing-locally-docker.rst b/docs/developing-locally-docker.rst index 858f89b88..e0b522c8c 100644 --- a/docs/developing-locally-docker.rst +++ b/docs/developing-locally-docker.rst @@ -18,7 +18,7 @@ Prerequisites * Docker; if you don't have it yet, follow the `installation instructions`_; * Docker Compose; refer to the official documentation for the `installation guide`_. -* Pre-commit; refer to the official documentation for the `installation guide`_. +* Pre-commit; refer to the official documentation for the [pre-commit](https://pre-commit.com/#install). .. _`installation instructions`: https://docs.docker.com/install/#supported-platforms .. _`installation guide`: https://docs.docker.com/compose/install/ @@ -167,16 +167,18 @@ docker The ``container_name`` from the yml file can be used to check on containers with docker commands, for example: :: - $ docker logs worker - $ docker top worker + $ docker logs _local_celeryworker + $ docker top _local_celeryworker +Notice that the ``container_name`` is generated dynamically using your project slug as a prefix + Mailhog ~~~~~~~ When developing locally you can go with MailHog_ for email testing provided ``use_mailhog`` was set to ``y`` on setup. To proceed, -#. make sure ``mailhog`` container is up and running; +#. make sure ``_local_mailhog`` container is up and running; #. open up ``http://127.0.0.1:8025``. @@ -213,34 +215,34 @@ Developing locally with HTTPS Increasingly it is becoming necessary to develop software in a secure environment in order that there are very few changes when deploying to production. Recently Facebook changed their policies for apps/sites that use Facebook login which requires the use of an HTTPS URL for the OAuth redirect URL. So if you want to use the ``users`` application with a OAuth provider such as Facebook, securing your communication to the local development environment will be necessary. -On order to create a secure environment, we need to have a trusted SSL certficate installed in our Docker application. +In order to create a secure environment, we need to have a trusted SSL certficate installed in our Docker application. #. **Let's Encrypt** - - The official line from Let’s Encrypt is: - [For local development section] ... The best option: Generate your own certificate, either self-signed or signed by a local root, and trust it in your operating system’s trust store. Then use that certificate in your local web server. See below for details. + The official line from Let’s Encrypt is: + + [For local development section] ... The best option: Generate your own certificate, either self-signed or signed by a local root, and trust it in your operating system’s trust store. Then use that certificate in your local web server. See below for details. See `letsencrypt.org - certificates-for-localhost`_ .. _`letsencrypt.org - certificates-for-localhost`: https://letsencrypt.org/docs/certificates-for-localhost/ #. **mkcert: Valid Https Certificates For Localhost** - + `mkcert`_ is a simple by design tool that hides all the arcane knowledge required to generate valid TLS certificates. It works for any hostname or IP, including localhost. It supports macOS, Linux, and Windows, and Firefox, Chrome and Java. It even works on mobile devices with a couple manual steps. See https://blog.filippo.io/mkcert-valid-https-certificates-for-localhost/ .. _`mkcert`: https://github.com/FiloSottile/mkcert/blob/master/README.md#supported-root-stores -After installing a trusted TLS certificate, configure your docker installation. We are going to configure an ``nginx`` reverse-proxy server. This makes sure that it does not interfere with our ``traefik`` configuration that is reserved for production environements. +After installing a trusted TLS certificate, configure your docker installation. We are going to configure an ``nginx`` reverse-proxy server. This makes sure that it does not interfere with our ``traefik`` configuration that is reserved for production environments. These are the places that you should configure to secure your local environment. certs ~~~~~ -Take the certificates that you generated and place them in a folder called ``certs`` on the projects root folder. Assuming that you registered your local hostname as ``my-dev-env.local``, the certificates you will put in the folder should have the names ``my-dev-env.local.crt`` and ``my-dev-env.local.key``. +Take the certificates that you generated and place them in a folder called ``certs`` in the project's root folder. Assuming that you registered your local hostname as ``my-dev-env.local``, the certificates you will put in the folder should have the names ``my-dev-env.local.crt`` and ``my-dev-env.local.key``. local.yml ~~~~~~~~~ @@ -261,11 +263,11 @@ local.yml restart: always depends_on: - django - + ... -#. Link the ``nginx-proxy`` to ``django`` through environmental variables. - +#. Link the ``nginx-proxy`` to ``django`` through environment variables. + ``django`` already has an ``.env`` file connected to it. Add the following variables. You should do this especially if you are working with a team and you want to keep your local environment details to yourself. :: diff --git a/docs/developing-locally.rst b/docs/developing-locally.rst index 83bc1342c..a9a54a03b 100644 --- a/docs/developing-locally.rst +++ b/docs/developing-locally.rst @@ -26,7 +26,7 @@ First things first. #. Install cookiecutter-django: :: - $ cookiecutter gh:pydanny/cookiecutter-django + $ cookiecutter gh:cookiecutter/cookiecutter-django #. Install development requirements: :: @@ -87,7 +87,7 @@ or if you're running asynchronously: :: .. _Redis: https://redis.io/download .. _CookieCutter: https://github.com/cookiecutter/cookiecutter .. _createdb: https://www.postgresql.org/docs/current/static/app-createdb.html -.. _initial PostgreSQL set up: http://suite.opengeo.org/docs/latest/dataadmin/pgGettingStarted/firstconnect.html +.. _initial PostgreSQL set up: https://web.archive.org/web/20190303010033/http://suite.opengeo.org/docs/latest/dataadmin/pgGettingStarted/firstconnect.html .. _postgres documentation: https://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html .. _pre-commit: https://pre-commit.com/ .. _direnv: https://direnv.net/ @@ -145,17 +145,33 @@ when developing locally. If you have the appropriate setup on your local machine in ``config/settings/local.py``:: CELERY_TASK_ALWAYS_EAGER = False - + To run Celery locally, make sure redis-server is installed (instructions are available at https://redis.io/topics/quickstart), run the server in one terminal with `redis-server`, and then start celery in another terminal with the following command:: - + celery -A config.celery_app worker --loglevel=info Sass Compilation & Live Reloading --------------------------------- -If you’d like to take advantage of live reloading and Sass compilation you can do so with a little -bit of preparation, see :ref:`sass-compilation-live-reload`. +If you've opted for Gulp as JS task runner, the project comes configured with `Sass`_ compilation and `live reloading`_. As you change you Sass/JS source files, the task runner will automatically rebuild the corresponding CSS and JS assets and reload them in your browser without refreshing the page. + +#. Make sure that `Node.js`_ v16 is installed on your machine. +#. In the project root, install the JS dependencies with:: + + $ npm install + +#. Now - with your virtualenv activated - start the application by running:: + + $ npm run dev + + The app will now run with live reloading enabled, applying front-end changes dynamically. + +.. note:: The task will start 2 processes in parallel: the static assets build loop on one side, and the Django server on the other. You don NOT need to run Django as your would normally with ``manage.py runserver``. + +.. _Node.js: http://nodejs.org/download/ +.. _Sass: https://sass-lang.com/ +.. _live reloading: https://browsersync.io Summary ------- diff --git a/docs/faq.rst b/docs/faq.rst index 59e82465f..820fb60fa 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -10,7 +10,7 @@ It is there to add a migration so you don't have to manually change the ``sites. See `0003_set_site_domain_and_name.py`_. -.. _`0003_set_site_domain_and_name.py`: https://github.com/pydanny/cookiecutter-django/blob/master/%7B%7Bcookiecutter.project_slug%7D%7D/%7B%7Bcookiecutter.project_slug%7D%7D/contrib/sites/migrations/0003_set_site_domain_and_name.py +.. _`0003_set_site_domain_and_name.py`: https://github.com/cookiecutter/cookiecutter-django/blob/master/%7B%7Bcookiecutter.project_slug%7D%7D/%7B%7Bcookiecutter.project_slug%7D%7D/contrib/sites/migrations/0003_set_site_domain_and_name.py Why aren't you using just one configuration file (12-Factor App) diff --git a/docs/index.rst b/docs/index.rst index f62184643..dae641d10 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,13 +1,14 @@ .. cookiecutter-django documentation master file. Welcome to Cookiecutter Django's documentation! -==================================================================== +=============================================== -A Cookiecutter_ template for Django. +Powered by Cookiecutter_, Cookiecutter Django is a project template for jumpstarting production-ready Django projects. The template offers a number of generation options, we invite you to check the :ref:`dedicated page ` to learn more about each of them. .. _cookiecutter: https://github.com/cookiecutter/cookiecutter -Contents: +Contents +-------- .. toctree:: :maxdepth: 2 @@ -28,7 +29,7 @@ Contents: troubleshooting Indices and tables -================== +------------------ * :ref:`genindex` * :ref:`search` diff --git a/docs/live-reloading-and-sass-compilation.rst b/docs/live-reloading-and-sass-compilation.rst deleted file mode 100644 index a55b4fd8c..000000000 --- a/docs/live-reloading-and-sass-compilation.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. _sass-compilation-live-reload: - -Sass Compilation & Live Reloading -================================= - -If you'd like to take advantage of `live reload`_ and Sass compilation: - -- Make sure that nodejs_ is installed. Then in the project root run:: - - $ npm install - -.. _nodejs: http://nodejs.org/download/ - -- Now you just need:: - - $ npm run dev - -The base app will now run as it would with the usual ``manage.py runserver`` but with live reloading and Sass compilation enabled. -When changing your Sass files, they will be automatically recompiled and change will be reflected in your browser without refreshing. - -To get live reloading to work you'll probably need to install an `appropriate browser extension`_ - -.. _live reload: http://livereload.com/ -.. _appropriate browser extension: http://livereload.com/extensions/ diff --git a/docs/mailgun.rst b/docs/mailgun.rst index 1f34e3c86..b5f49b625 100644 --- a/docs/mailgun.rst +++ b/docs/mailgun.rst @@ -1,7 +1,7 @@ If your email server used to send email isn't configured properly (Mailgun by default), attempting to send an email will cause an Internal Server Error. -By default, django-allauth is setup to `have emails verifications mandatory`_, +By default, ``django-allauth`` is setup to `have emails verifications mandatory`_, which means it'll send a verification email when an unverified user tries to log-in or when someone tries to sign-up. diff --git a/docs/project-generation-options.rst b/docs/project-generation-options.rst index 8a81e19de..26fb79d2f 100644 --- a/docs/project-generation-options.rst +++ b/docs/project-generation-options.rst @@ -1,6 +1,12 @@ +.. _template-options: + Project Generation Options ========================== +This page describes all the template options that will be prompted by the `cookiecutter CLI`_ prior to generating your project. + +.. _cookiecutter CLI: https://github.com/cookiecutter/cookiecutter + project_name: Your project's human-readable name, capitals and spaces allowed. @@ -49,11 +55,11 @@ use_docker: postgresql_version: Select a PostgreSQL_ version to use. The choices are: - 1. 12.3 - 2. 11.8 - 3. 10.8 - 4. 9.6 - 5. 9.5 + 1. 14.1 + 2. 13.5 + 3. 12.9 + 4. 11.14 + 5. 10.19 js_task_runner: Select a JavaScript task runner. The choices are: diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 000000000..d9286ce24 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,2 @@ +sphinx==4.4.0 +sphinx-rtd-theme==1.0.0 diff --git a/docs/troubleshooting.rst b/docs/troubleshooting.rst index 8aa1b1f9b..ba8ab53e6 100644 --- a/docs/troubleshooting.rst +++ b/docs/troubleshooting.rst @@ -47,5 +47,5 @@ Others #. New apps not getting created in project root: This is the expected behavior, because cookiecutter-django does not change the way that django startapp works, you'll have to fix this manually (see `#1725`_) -.. _#528: https://github.com/pydanny/cookiecutter-django/issues/528#issuecomment-212650373 -.. _#1725: https://github.com/pydanny/cookiecutter-django/issues/1725#issuecomment-407493176 +.. _#528: https://github.com/cookiecutter/cookiecutter-django/issues/528#issuecomment-212650373 +.. _#1725: https://github.com/cookiecutter/cookiecutter-django/issues/1725#issuecomment-407493176 diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index aa6a710a4..83ef3ebe6 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -5,10 +5,12 @@ NOTE: can potentially be run in Python 2.x environment (at least so we presume in `pre_gen_project.py`). -TODO: ? restrict Cookiecutter Django project initialization to Python 3.x environments only +TODO: restrict Cookiecutter Django project initialization to + Python 3.x environments only """ from __future__ import print_function +import json import os import random import shutil @@ -59,6 +61,10 @@ def remove_docker_files(): file_names = ["local.yml", "production.yml", ".dockerignore"] for file_name in file_names: os.remove(file_name) + if "{{ cookiecutter.use_pycharm }}".lower() == "y": + file_names = ["docker_compose_up_django.xml", "docker_compose_up_docs.xml"] + for file_name in file_names: + os.remove(os.path.join(".idea", "runConfigurations", file_name)) def remove_utility_files(): @@ -94,6 +100,16 @@ def remove_packagejson_file(): os.remove(file_name) +def remove_bootstrap_packages(): + with open("package.json", mode="r") as fd: + content = json.load(fd) + for package_name in ["bootstrap", "gulp-concat", "@popperjs/core"]: + content["devDependencies"].pop(package_name) + with open("package.json", mode="w") as fd: + json.dump(content, fd, ensure_ascii=False, indent=2) + fd.write("\n") + + def remove_celery_files(): file_names = [ os.path.join("config", "celery_app.py"), @@ -127,13 +143,6 @@ def remove_dotgithub_folder(): shutil.rmtree(".github") -def append_to_project_gitignore(path): - gitignore_file_path = ".gitignore" - with open(gitignore_file_path, "a") as gitignore_file: - gitignore_file.write(path) - gitignore_file.write(os.linesep) - - def generate_random_string( length, using_digits=False, using_ascii_letters=False, using_punctuation=False ): @@ -164,8 +173,8 @@ def set_flag(file_path, flag, value=None, formatted=None, *args, **kwargs): random_string = generate_random_string(*args, **kwargs) if random_string is None: print( - "We couldn't find a secure pseudo-random number generator on your system. " - "Please, make sure to manually {} later.".format(flag) + "We couldn't find a secure pseudo-random number generator on your " + "system. Please, make sure to manually {} later.".format(flag) ) random_string = flag if formatted is not None: @@ -248,10 +257,10 @@ def set_celery_flower_password(file_path, value=None): return celery_flower_password -def append_to_gitignore_file(s): +def append_to_gitignore_file(ignored_line): with open(".gitignore", "a") as gitignore_file: - gitignore_file.write(s) - gitignore_file.write(os.linesep) + gitignore_file.write(ignored_line) + gitignore_file.write("\n") def set_flags_in_envs(postgres_user, celery_flower_user, debug=False): @@ -318,6 +327,11 @@ def remove_drf_starter_files(): "{{cookiecutter.project_slug}}", "users", "tests", "test_drf_views.py" ) ) + os.remove( + os.path.join( + "{{cookiecutter.project_slug}}", "users", "tests", "test_swagger_ui.py" + ) + ) def remove_storages_module(): @@ -385,6 +399,8 @@ def main(): remove_packagejson_file() if "{{ cookiecutter.use_docker }}".lower() == "y": remove_node_dockerfile() + elif "{{ cookiecutter.custom_bootstrap_compilation }}" == "n": + remove_bootstrap_packages() if ("{{ cookiecutter.cloud_provider}}".lower() == "none") and ( "{{ cookiecutter.use_nginx_for_serve_media_files}}".lower() == "n" diff --git a/hooks/pre_gen_project.py b/hooks/pre_gen_project.py index c4f64c737..08983b918 100644 --- a/hooks/pre_gen_project.py +++ b/hooks/pre_gen_project.py @@ -4,7 +4,8 @@ NOTE: as the whole Cookiecutter Django project initialization can potentially be run in Python 2.x environment. -TODO: ? restrict Cookiecutter Django project initialization to Python 3.x environments only +TODO: restrict Cookiecutter Django project initialization + to Python 3.x environments only """ from __future__ import print_function @@ -45,7 +46,7 @@ if "{{ cookiecutter.use_docker }}".lower() == "n": ) yes_options, no_options = frozenset(["y"]), frozenset(["n"]) while True: - choice = raw_input().lower() + choice = raw_input().lower() # noqa: F821 if choice in yes_options: break @@ -71,7 +72,8 @@ if ( and "{{ cookiecutter.cloud_provider }}" == "None" ): print( - "You should either use Whitenoise or select a Cloud Provider to serve static files" + "You should either use Whitenoise or select a " + "Cloud Provider to serve static files" ) sys.exit(1) @@ -92,6 +94,7 @@ if ( and "{{ cookiecutter.mail_service }}" == "Amazon SES" ): print( - "You should either use AWS or select a different Mail Service for sending emails." + "You should either use AWS or select a different " + "Mail Service for sending emails." ) sys.exit(1) diff --git a/requirements.txt b/requirements.txt index 57541921e..763fe10e3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,21 +4,23 @@ binaryornot==0.4.4 # Code quality # ------------------------------------------------------------------------------ -black==21.7b0 -isort==5.9.3 -flake8==3.9.2 -flake8-isort==4.0.0 -pre-commit==2.14.0 +black==21.12b0 +isort==5.10.1 +flake8==4.0.1 +flake8-isort==4.1.1 +pre-commit==2.17.0 # Testing # ------------------------------------------------------------------------------ -tox==3.24.1 -pytest==6.2.4 +tox==3.24.5 +pytest==6.2.5 pytest-cookies==0.6.1 pytest-instafail==0.4.2 -pyyaml==5.4.1 +pyyaml==6.0 # Scripting # ------------------------------------------------------------------------------ PyGithub==1.55 -jinja2==3.0.1 +gitpython==3.1.26 +jinja2==3.0.3 +requests==2.27.1 diff --git a/scripts/__init__.py b/scripts/__init__.py index 8b1378917..e69de29bb 100644 --- a/scripts/__init__.py +++ b/scripts/__init__.py @@ -1 +0,0 @@ - diff --git a/scripts/create_django_issue.py b/scripts/create_django_issue.py new file mode 100644 index 000000000..daee8fe16 --- /dev/null +++ b/scripts/create_django_issue.py @@ -0,0 +1,295 @@ +""" +Creates an issue that generates a table for dependency checking whether +all packages support the latest Django version. "Latest" does not include +patches, only comparing major and minor version numbers. + +This script handles when there are multiple Django versions that need +to keep up to date. +""" +from __future__ import annotations + +import os +import re +import sys +from pathlib import Path +from typing import TYPE_CHECKING, Any, Iterable, NamedTuple + +import requests +from github import Github + +if TYPE_CHECKING: + from github.Issue import Issue + +CURRENT_FILE = Path(__file__) +ROOT = CURRENT_FILE.parents[1] +REQUIREMENTS_DIR = ROOT / "{{cookiecutter.project_slug}}" / "requirements" +GITHUB_TOKEN = os.getenv("GITHUB_TOKEN", None) +GITHUB_REPO = os.getenv("GITHUB_REPOSITORY", None) + + +class DjVersion(NamedTuple): + """ + Wrapper to parse, compare and render Django versions. + + Only keeps track on (major, minor) versions, excluding patches and pre-releases. + """ + + major: int + minor: int + + def __str__(self) -> str: + """To render as string.""" + return f"{self.major}.{self.minor}" + + @classmethod + def parse(cls, version_str: str) -> DjVersion: + """Parse interesting values from the version string.""" + major, minor, *_ = version_str.split(".") + return cls(major=int(major), minor=int(minor)) + + +def get_package_info(package: str) -> dict: + """Get package metadata using PyPI API.""" + # "django" converts to "Django" on redirect + r = requests.get(f"https://pypi.org/pypi/{package}/json", allow_redirects=True) + if not r.ok: + print(f"Couldn't find package: {package}") + sys.exit(1) + return r.json() + + +def get_django_versions() -> Iterable[DjVersion]: + """List all django versions.""" + django_package_info: dict[str, Any] = get_package_info("django") + releases = django_package_info["releases"].keys() + for release_str in releases: + if release_str.replace(".", "").isdigit(): + # Exclude pre-releases with non-numeric characters in version + yield DjVersion.parse(release_str) + + +def get_name_and_version(requirements_line: str) -> tuple[str, ...]: + """Get the name a version of a package from a line in the requirement file.""" + full_name, version = requirements_line.split(" ", 1)[0].split("==") + name_without_extras = full_name.split("[", 1)[0] + return name_without_extras, version + + +def get_all_latest_django_versions() -> tuple[DjVersion, list[DjVersion]]: + """ + Grabs all Django versions that are worthy of a GitHub issue. + + Depends on Django versions having higher major version or minor version. + """ + print("Fetching all Django versions from PyPI") + base_txt = REQUIREMENTS_DIR / "base.txt" + with base_txt.open() as f: + for line in f.readlines(): + if "django==" in line: + break + else: + print(f"django not found in {base_txt}") # Huh...? + sys.exit(1) + + # Begin parsing and verification + _, current_version_str = get_name_and_version(line) + # Get a tuple of (major, minor) - ignoring patch version + current_minor_version = DjVersion.parse(current_version_str) + newer_versions: set[DjVersion] = set() + for django_version in get_django_versions(): + if django_version > current_minor_version: + newer_versions.add(django_version) + + return current_minor_version, sorted(newer_versions, reverse=True) + + +_TABLE_HEADER = """ + +## {file}.txt + +| Name | Version in Master | {dj_version} Compatible Version | OK | +| ---- | :---------------: | :-----------------------------: | :-: | +""" +VITAL_BUT_UNKNOWN = [ + "django-environ", # not updated often +] + + +class GitHubManager: + def __init__(self, base_dj_version: DjVersion, needed_dj_versions: list[DjVersion]): + self.github = Github(GITHUB_TOKEN) + self.repo = self.github.get_repo(GITHUB_REPO) + + self.base_dj_version = base_dj_version + self.needed_dj_versions = needed_dj_versions + # (major+minor) Version and description + self.existing_issues: dict[DjVersion, Issue] = {} + + # Load all requirements from our requirements files and preload their + # package information like a cache: + self.requirements_files = ["base", "local", "production"] + # Format: + # requirement file name: {package name: (master_version, package_info)} + self.requirements: dict[str, dict[str, tuple[str, dict]]] = { + x: {} for x in self.requirements_files + } + + def setup(self) -> None: + self.load_requirements() + self.load_existing_issues() + + def load_requirements(self): + print("Reading requirements") + for requirements_file in self.requirements_files: + with (REQUIREMENTS_DIR / f"{requirements_file}.txt").open() as f: + for line in f.readlines(): + if "==" in line and not line.startswith("{%"): + name, version = get_name_and_version(line) + self.requirements[requirements_file][name] = ( + version, + get_package_info(name), + ) + + def load_existing_issues(self): + """Closes the issue if the base Django version is greater than needed""" + print("Load existing issues from GitHub") + qualifiers = { + "repo": GITHUB_REPO, + "author": "app/github-actions", + "state": "open", + "is": "issue", + "in": "title", + } + issues = list( + self.github.search_issues( + "[Django Update]", "created", "desc", **qualifiers + ) + ) + print(f"Found {len(issues)} issues matching search") + for issue in issues: + matches = re.match(r"\[Update Django] Django (\d+.\d+)$", issue.title) + if not matches: + continue + issue_version = DjVersion.parse(matches.group(1)) + if self.base_dj_version > issue_version: + issue.edit(state="closed") + print(f"Closed issue {issue.title} (ID: [{issue.id}]({issue.url}))") + else: + self.existing_issues[issue_version] = issue + + def get_compatibility( + self, package_name: str, package_info: dict, needed_dj_version: DjVersion + ): + """ + Verify compatibility via setup.py classifiers. If Django is not in the + classifiers, then default compatibility is n/a and OK is ✅. + + If it's a package that's vital but known to not be updated often, we give it + a ❓. If a package has ❓ or 🕒, then we allow manual update. Automatic updates + only include ❌ and ✅. + """ + # If issue previously existed, find package and skip any gtg, manually + # updated packages, or known releases that will happen but haven't yet + if issue := self.existing_issues.get(needed_dj_version): + if index := issue.body.find(package_name): + name, _current, prev_compat, ok = [ + s.strip() for s in issue.body[index:].split("|", 4)[:4] + ] + if ok in ("✅", "❓", "🕒"): + return prev_compat, ok + + if package_name in VITAL_BUT_UNKNOWN: + return "", "❓" + + # Check classifiers if it includes Django + supported_dj_versions: list[DjVersion] = [] + for classifier in package_info["info"]["classifiers"]: + # Usually in the form of "Framework :: Django :: 3.2" + tokens = classifier.split(" ") + if len(tokens) >= 5 and tokens[2].lower() == "django": + version = DjVersion.parse(tokens[4]) + if len(version) == 2: + supported_dj_versions.append(version) + + if supported_dj_versions: + if any(v >= needed_dj_version for v in supported_dj_versions): + return package_info["info"]["version"], "✅" + else: + return "", "❌" + + # Django classifier DNE; assume it isn't a Django lib + # Great exceptions include pylint-django, where we need to do this manually... + return "n/a", "✅" + + HOME_PAGE_URL_KEYS = [ + "home_page", + "project_url", + "docs_url", + "package_url", + "release_url", + "bugtrack_url", + ] + + def _get_md_home_page_url(self, package_info: dict): + urls = [ + package_info["info"].get(url_key) for url_key in self.HOME_PAGE_URL_KEYS + ] + try: + return f"[{{}}]({next(item for item in urls if item)})" + except StopIteration: + return "{}" + + def generate_markdown(self, needed_dj_version: DjVersion): + requirements = f"{needed_dj_version} requirements tables\n\n" + for _file in self.requirements_files: + requirements += _TABLE_HEADER.format_map( + {"file": _file, "dj_version": needed_dj_version} + ) + for package_name, (version, info) in self.requirements[_file].items(): + compat_version, icon = self.get_compatibility( + package_name, info, needed_dj_version + ) + requirements += ( + f"| {self._get_md_home_page_url(info).format(package_name)} " + f"| {version} " + f"| {compat_version} " + f"| {icon} " + f"|\n" + ) + return requirements + + def create_or_edit_issue(self, needed_dj_version: DjVersion, description: str): + if issue := self.existing_issues.get(needed_dj_version): + print(f"Editing issue #{issue.number} for Django {needed_dj_version}") + issue.edit(body=description) + else: + print(f"Creating new issue for Django {needed_dj_version}") + issue = self.repo.create_issue( + f"[Update Django] Django {needed_dj_version}", description + ) + issue.add_to_labels(f"django{needed_dj_version}") + + def generate(self): + for version in self.needed_dj_versions: + print(f"Handling GitHub issue for Django {version}") + md_content = self.generate_markdown(version) + print(f"Generated markdown:\n\n{md_content}") + self.create_or_edit_issue(version, md_content) + + +def main() -> None: + # Check if there are any djs + current_dj, latest_djs = get_all_latest_django_versions() + if not latest_djs: + sys.exit(0) + manager = GitHubManager(current_dj, latest_djs) + manager.setup() + manager.generate() + + +if __name__ == "__main__": + if GITHUB_REPO is None: + raise RuntimeError( + "No github repo, please set the environment variable GITHUB_REPOSITORY" + ) + main() diff --git a/scripts/update_changelog.py b/scripts/update_changelog.py index 08ff5b095..c3c834eef 100644 --- a/scripts/update_changelog.py +++ b/scripts/update_changelog.py @@ -1,22 +1,31 @@ +import datetime as dt import os +import re from pathlib import Path +from typing import Iterable + +import git +import github.PullRequest +import github.Repository from github import Github from jinja2 import Template -import datetime as dt CURRENT_FILE = Path(__file__) ROOT = CURRENT_FILE.parents[1] -GITHUB_TOKEN = os.getenv("GITHUB_TOKEN", None) - -# Generate changelog for PRs merged yesterday -MERGED_DATE = dt.date.today() - dt.timedelta(days=1) +GITHUB_TOKEN = os.getenv("GITHUB_TOKEN") +GITHUB_REPO = os.getenv("GITHUB_REPOSITORY") +GIT_BRANCH = os.getenv("GITHUB_REF_NAME") def main() -> None: """ Script entry point. """ - merged_pulls = list(iter_pulls()) + # Generate changelog for PRs merged yesterday + merged_date = dt.date.today() - dt.timedelta(days=1) + repo = Github(login_or_token=GITHUB_TOKEN).get_repo(GITHUB_REPO) + merged_pulls = list(iter_pulls(repo, merged_date)) + print(f"Merged pull requests: {merged_pulls}") if not merged_pulls: print("Nothing was merged, existing.") return @@ -25,30 +34,50 @@ def main() -> None: grouped_pulls = group_pulls_by_change_type(merged_pulls) # Generate portion of markdown - rendered_content = generate_md(grouped_pulls) + release_changes_summary = generate_md(grouped_pulls) + print(f"Summary of changes: {release_changes_summary}") # Update CHANGELOG.md file - file_path = ROOT / "CHANGELOG.md" - old_content = file_path.read_text() - updated_content = old_content.replace( - "", - f"\n\n{rendered_content}", + release = f"{merged_date:%Y.%m.%d}" + changelog_path = ROOT / "CHANGELOG.md" + write_changelog(changelog_path, release, release_changes_summary) + print(f"Wrote {changelog_path}") + + # Update version + setup_py_path = ROOT / "setup.py" + update_version(setup_py_path, release) + print(f"Updated version in {setup_py_path}") + + # Commit changes, create tag and push + update_git_repo([changelog_path, setup_py_path], release) + + # Create GitHub release + github_release = repo.create_git_release( + tag=release, + name=release, + message=release_changes_summary, ) - file_path.write_text(updated_content) + print(f"Created release on GitHub {github_release}") -def iter_pulls(): +def iter_pulls( + repo: github.Repository.Repository, + merged_date: dt.date, +) -> Iterable[github.PullRequest.PullRequest]: """Fetch merged pull requests at the date we're interested in.""" - repo = Github(login_or_token=GITHUB_TOKEN).get_repo("pydanny/cookiecutter-django") recent_pulls = repo.get_pulls( - state="closed", sort="updated", direction="desc" + state="closed", + sort="updated", + direction="desc", ).get_page(0) for pull in recent_pulls: - if pull.merged and pull.merged_at.date() == MERGED_DATE: + if pull.merged and pull.merged_at.date() == merged_date: yield pull -def group_pulls_by_change_type(pull_requests_list): +def group_pulls_by_change_type( + pull_requests_list: list[github.PullRequest.PullRequest], +) -> dict[str, list[github.PullRequest.PullRequest]]: """Group pull request by change type.""" grouped_pulls = { "Changed": [], @@ -56,7 +85,7 @@ def group_pulls_by_change_type(pull_requests_list): "Updated": [], } for pull in pull_requests_list: - label_names = {l.name for l in pull.labels} + label_names = {label.name for label in pull.labels} if "update" in label_names: group_name = "Updated" elif "bug" in label_names: @@ -67,12 +96,63 @@ def group_pulls_by_change_type(pull_requests_list): return grouped_pulls -def generate_md(grouped_pulls): +def generate_md(grouped_pulls: dict[str, list[github.PullRequest.PullRequest]]) -> str: """Generate markdown file from Jinja template.""" changelog_template = ROOT / ".github" / "changelog-template.md" template = Template(changelog_template.read_text(), autoescape=True) - return template.render(merge_date=MERGED_DATE, grouped_pulls=grouped_pulls) + return template.render(grouped_pulls=grouped_pulls) + + +def write_changelog(file_path: Path, release: str, content: str) -> None: + """Write Release details to the changelog file.""" + content = f"## {release}\n{content}" + old_content = file_path.read_text() + updated_content = old_content.replace( + "", + f"\n\n{content}", + ) + file_path.write_text(updated_content) + + +def update_version(file_path: Path, release: str) -> None: + """Update template version in setup.py.""" + old_content = file_path.read_text() + updated_content = re.sub( + r'\nversion = "\d+\.\d+\.\d+"\n', + f'\nversion = "{release}"\n', + old_content, + ) + file_path.write_text(updated_content) + + +def update_git_repo(paths: list[Path], release: str) -> None: + """Commit, tag changes in git repo and push to origin.""" + repo = git.Repo(ROOT) + for path in paths: + repo.git.add(path) + message = f"Release {release}" + + user = repo.git.config("--get", "user.name") + email = repo.git.config("--get", "user.email") + + repo.git.commit( + m=message, + author=f"{user} <{email}>", + ) + repo.git.tag("-a", release, m=message) + server = f"https://{GITHUB_TOKEN}@github.com/{GITHUB_REPO}.git" + print(f"Pushing changes to {GIT_BRANCH} branch of {GITHUB_REPO}") + repo.git.push(server, GIT_BRANCH) + repo.git.push("--tags", server, GIT_BRANCH) if __name__ == "__main__": + if GITHUB_REPO is None: + raise RuntimeError( + "No github repo, please set the environment variable GITHUB_REPOSITORY" + ) + if GIT_BRANCH is None: + raise RuntimeError( + "No git branch set, please set the GITHUB_REF_NAME environment variable" + ) main() diff --git a/scripts/update_contributors.py b/scripts/update_contributors.py index 0236daae3..76ccf60ad 100644 --- a/scripts/update_contributors.py +++ b/scripts/update_contributors.py @@ -1,5 +1,7 @@ import json +import os from pathlib import Path + from github import Github from github.NamedUser import NamedUser from jinja2 import Template @@ -7,6 +9,8 @@ from jinja2 import Template CURRENT_FILE = Path(__file__) ROOT = CURRENT_FILE.parents[1] BOT_LOGINS = ["pyup-bot"] +GITHUB_TOKEN = os.getenv("GITHUB_TOKEN", None) +GITHUB_REPO = os.getenv("GITHUB_REPOSITORY", None) def main() -> None: @@ -39,7 +43,7 @@ def iter_recent_authors(): Use Github API to fetch recent authors rather than git CLI to work with Github usernames. """ - repo = Github(per_page=5).get_repo("pydanny/cookiecutter-django") + repo = Github(login_or_token=GITHUB_TOKEN, per_page=5).get_repo(GITHUB_REPO) recent_pulls = repo.get_pulls( state="closed", sort="updated", direction="desc" ).get_page(0) @@ -101,4 +105,8 @@ def write_md_file(contributors): if __name__ == "__main__": + if GITHUB_REPO is None: + raise RuntimeError( + "No github repo, please set the environment variable GITHUB_REPOSITORY" + ) main() diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 000000000..dd8f1ef3c --- /dev/null +++ b/setup.cfg @@ -0,0 +1,7 @@ +[flake8] +exclude = docs +max-line-length = 88 + +[isort] +profile = black +known_first_party = tests,scripts,hooks diff --git a/setup.py b/setup.py index 64e923aef..cd7e7e9d4 100644 --- a/setup.py +++ b/setup.py @@ -1,21 +1,11 @@ #!/usr/bin/env python - -import os -import sys - try: from setuptools import setup except ImportError: from distutils.core import setup -# 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.1.13" - -if sys.argv[-1] == "tag": - os.system(f'git tag -a {version} -m "version {version}"') - os.system("git push --tags") - sys.exit() +# We use calendar versioning +version = "2022.01.27" with open("README.rst") as readme_file: long_description = readme_file.read() @@ -23,18 +13,21 @@ with open("README.rst") as readme_file: setup( name="cookiecutter-django", version=version, - description="A Cookiecutter template for creating production-ready Django projects quickly.", + description=( + "A Cookiecutter template for creating production-ready " + "Django projects quickly." + ), long_description=long_description, author="Daniel Roy Greenfeld", author_email="pydanny@gmail.com", - url="https://github.com/pydanny/cookiecutter-django", + url="https://github.com/cookiecutter/cookiecutter-django", packages=[], license="BSD", zip_safe=False, classifiers=[ "Development Status :: 4 - Beta", "Environment :: Console", - "Framework :: Django :: 3.0", + "Framework :: Django :: 3.2", "Intended Audience :: Developers", "Natural Language :: English", "License :: OSI Approved :: BSD License", diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/test_bare.sh b/tests/test_bare.sh index 1f52d91b6..05da9328b 100755 --- a/tests/test_bare.sh +++ b/tests/test_bare.sh @@ -6,19 +6,12 @@ set -o errexit set -x -# Install modern pip with new resolver: -# https://blog.python.org/2020/11/pip-20-3-release-new-resolver.html -pip install 'pip>=20.3' - -# install test requirements -pip install -r requirements.txt - # create a cache directory mkdir -p .cache/bare cd .cache/bare # create the project using the default settings in cookiecutter.json -cookiecutter ../../ --no-input --overwrite-if-exists use_docker=n $@ +cookiecutter ../../ --no-input --overwrite-if-exists use_docker=n "$@" cd my_awesome_project # Install OS deps @@ -35,3 +28,18 @@ pre-commit run --show-diff-on-failure -a # run the project's tests pytest + +# Make sure the check doesn't raise any warnings +python manage.py check --fail-level WARNING + +if [ -f "package.json" ] +then + npm install + if [ -f "gulpfile.js" ] + then + npm run build + fi +fi + +# Generate the HTML for the documentation +cd docs && make html diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py index d53019e9b..49a0d2cc8 100755 --- a/tests/test_cookiecutter_generation.py +++ b/tests/test_cookiecutter_generation.py @@ -1,15 +1,25 @@ import os import re +import sys import pytest -from cookiecutter.exceptions import FailedHookException -import sh + +try: + import sh +except (ImportError, ModuleNotFoundError): + sh = None # sh doesn't support Windows import yaml from binaryornot.check import is_binary +from cookiecutter.exceptions import FailedHookException PATTERN = r"{{(\s?cookiecutter)[.](.*?)}}" RE_OBJ = re.compile(PATTERN) +if sys.platform.startswith("win"): + pytest.skip("sh doesn't support windows", allow_module_level=True) +elif sys.platform.startswith("darwin") and os.getenv("CI"): + pytest.skip("skipping slow macOS tests on CI", allow_module_level=True) + @pytest.fixture def context(): @@ -37,10 +47,11 @@ SUPPORTED_COMBINATIONS = [ {"use_pycharm": "n"}, {"use_docker": "y"}, {"use_docker": "n"}, - {"postgresql_version": "13.2"}, - {"postgresql_version": "12.6"}, - {"postgresql_version": "11.11"}, - {"postgresql_version": "10.16"}, + {"postgresql_version": "14.1"}, + {"postgresql_version": "13.5"}, + {"postgresql_version": "12.9"}, + {"postgresql_version": "11.14"}, + {"postgresql_version": "10.19"}, {"cloud_provider": "AWS", "use_whitenoise": "y"}, {"cloud_provider": "AWS", "use_whitenoise": "n"}, {"cloud_provider": "GCP", "use_whitenoise": "y"}, @@ -110,7 +121,7 @@ UNSUPPORTED_COMBINATIONS = [ def _fixture_id(ctx): - """Helper to get a user friendly test name from the parametrized context.""" + """Helper to get a user-friendly test name from the parametrized context.""" return "-".join(f"{key}:{value}" for key, value in ctx.items()) @@ -264,7 +275,7 @@ def test_github_invokes_linter_and_pytest( @pytest.mark.parametrize("slug", ["project slug", "Project_Slug"]) def test_invalid_slug(cookies, context, slug): - """Invalid slug should failed pre-generation hook.""" + """Invalid slug should fail pre-generation hook.""" context.update({"project_slug": slug}) result = cookies.bake(extra_context=context) @@ -281,3 +292,20 @@ def test_error_if_incompatible(cookies, context, invalid_context): assert result.exit_code != 0 assert isinstance(result.exception, FailedHookException) + + +@pytest.mark.parametrize( + ["use_pycharm", "pycharm_docs_exist"], + [ + ("n", False), + ("y", True), + ], +) +def test_pycharm_docs_removed(cookies, context, use_pycharm, pycharm_docs_exist): + """.""" + context.update({"use_pycharm": use_pycharm}) + result = cookies.bake(extra_context=context) + + with open(f"{result.project}/docs/index.rst", "r") as f: + has_pycharm_docs = "pycharm/configuration" in f.read() + assert has_pycharm_docs is pycharm_docs_exist diff --git a/tests/test_docker.sh b/tests/test_docker.sh index 001ef06d0..b3663bd2c 100755 --- a/tests/test_docker.sh +++ b/tests/test_docker.sh @@ -6,15 +6,12 @@ set -o errexit set -x -# install test requirements -pip install -r requirements.txt - # create a cache directory mkdir -p .cache/docker cd .cache/docker # create the project using the default settings in cookiecutter.json -cookiecutter ../../ --no-input --overwrite-if-exists use_docker=y $@ +cookiecutter ../../ --no-input --overwrite-if-exists use_docker=y "$@" cd my_awesome_project # Lint by running pre-commit on all files @@ -24,6 +21,9 @@ git init git add . pre-commit run --show-diff-on-failure -a +# make sure all images build +docker-compose -f local.yml build + # run the project's type checks docker-compose -f local.yml run django mypy my_awesome_project @@ -35,3 +35,9 @@ docker-compose -f local.yml run django python manage.py makemigrations --dry-run # Test support for translations docker-compose -f local.yml run django python manage.py makemessages --all + +# Make sure the check doesn't raise any warnings +docker-compose -f local.yml run django python manage.py check --fail-level WARNING + +# Generate the HTML for the documentation +docker-compose -f local.yml run docs make html diff --git a/tests/test_hooks.py b/tests/test_hooks.py new file mode 100644 index 000000000..7ca752722 --- /dev/null +++ b/tests/test_hooks.py @@ -0,0 +1,28 @@ +"""Unit tests for the hooks""" +import os +from pathlib import Path + +import pytest + +from hooks.post_gen_project import append_to_gitignore_file + + +@pytest.fixture() +def working_directory(tmp_path): + prev_cwd = Path.cwd() + os.chdir(tmp_path) + try: + yield tmp_path + finally: + os.chdir(prev_cwd) + + +def test_append_to_gitignore_file(working_directory): + gitignore_file = working_directory / ".gitignore" + gitignore_file.write_text("node_modules/\n") + append_to_gitignore_file(".envs/*") + linesep = os.linesep.encode() + assert ( + gitignore_file.read_bytes() == b"node_modules/" + linesep + b".envs/*" + linesep + ) + assert gitignore_file.read_text() == "node_modules/\n.envs/*\n" diff --git a/{{cookiecutter.project_slug}}/.editorconfig b/{{cookiecutter.project_slug}}/.editorconfig index 261407067..6a9a5c45d 100644 --- a/{{cookiecutter.project_slug}}/.editorconfig +++ b/{{cookiecutter.project_slug}}/.editorconfig @@ -12,7 +12,7 @@ trim_trailing_whitespace = true indent_style = space indent_size = 4 -[*.{html,css,scss,json,yml}] +[*.{html,css,scss,json,yml,xml}] indent_style = space indent_size = 2 diff --git a/{{cookiecutter.project_slug}}/.github/dependabot.yml b/{{cookiecutter.project_slug}}/.github/dependabot.yml index 8e8ac8663..cf88cf33b 100644 --- a/{{cookiecutter.project_slug}}/.github/dependabot.yml +++ b/{{cookiecutter.project_slug}}/.github/dependabot.yml @@ -1,7 +1,95 @@ +# Config for Dependabot updates. See Documentation here: +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + version: 2 updates: - # Update Github actions in workflows + # Update GitHub actions in workflows - package-ecosystem: "github-actions" directory: "/" + # Check for updates to GitHub Actions every weekday schedule: interval: "daily" + +{%- if cookiecutter.use_docker == 'y' %} + + # Enable version updates for Docker + # We need to specify each Dockerfile in a separate entry because Dependabot doesn't + # support wildcards or recursively checking subdirectories. Check this issue for updates: + # https://github.com/dependabot/dependabot-core/issues/2178 + - package-ecosystem: "docker" + # Look for a `Dockerfile` in the `compose/local/django` directory + directory: "compose/local/django/" + # Check for updates to GitHub Actions every weekday + schedule: + interval: "daily" + + # Enable version updates for Docker + - package-ecosystem: "docker" + # Look for a `Dockerfile` in the `compose/local/docs` directory + directory: "compose/local/docs/" + # Check for updates to GitHub Actions every weekday + schedule: + interval: "daily" + + # Enable version updates for Docker + - package-ecosystem: "docker" + # Look for a `Dockerfile` in the `compose/local/node` directory + directory: "compose/local/node/" + # Check for updates to GitHub Actions every weekday + schedule: + interval: "daily" + + # Enable version updates for Docker + - package-ecosystem: "docker" + # Look for a `Dockerfile` in the `compose/production/aws` directory + directory: "compose/production/aws/" + # Check for updates to GitHub Actions every weekday + schedule: + interval: "daily" + + # Enable version updates for Docker + - package-ecosystem: "docker" + # Look for a `Dockerfile` in the `compose/production/django` directory + directory: "compose/production/django/" + # Check for updates to GitHub Actions every weekday + schedule: + interval: "daily" + + # Enable version updates for Docker + - package-ecosystem: "docker" + # Look for a `Dockerfile` in the `compose/production/postgres` directory + directory: "compose/production/postgres/" + # Check for updates to GitHub Actions every weekday + schedule: + interval: "daily" + + # Enable version updates for Docker + - package-ecosystem: "docker" + # Look for a `Dockerfile` in the `compose/production/traefik` directory + directory: "compose/production/traefik/" + # Check for updates to GitHub Actions every weekday + schedule: + interval: "daily" + +{%- endif %} + + # Enable version updates for Python/Pip - Production + - package-ecosystem: "pip" + # Look for a `requirements.txt` in the `root` directory + # also 'setup.cfg', 'runtime.txt' and 'requirements/*.txt' + directory: "/" + # Check for updates to GitHub Actions every weekday + schedule: + interval: "daily" + +{%- if cookiecutter.js_task_runner != "None" %} + + # Enable version updates for javascript/npm + - package-ecosystem: "npm" + # Look for a `packages.json' in the `root` directory + directory: "/" + # Check for updates to GitHub Actions every weekday + schedule: + interval: "daily" + +{%- endif %} diff --git a/{{cookiecutter.project_slug}}/.github/workflows/ci.yml b/{{cookiecutter.project_slug}}/.github/workflows/ci.yml index 1e17068ee..c24f4cb94 100644 --- a/{{cookiecutter.project_slug}}/.github/workflows/ci.yml +++ b/{{cookiecutter.project_slug}}/.github/workflows/ci.yml @@ -23,16 +23,17 @@ jobs: - name: Checkout Code Repository uses: actions/checkout@v2 - - name: Set up Python 3.9 + - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: "3.9" + cache: pip + cache-dependency-path: | + requirements/base.txt + requirements/local.txt - # Run all pre-commit hooks on all the files. - # Getting only staged files can be tricky in case a new PR is opened - # since the action is run on a branch in detached head state - - name: Install and Run Pre-commit - uses: pre-commit/action@v2.0.0 + - name: Run pre-commit + uses: pre-commit/action@v2.0.3 # With no caching at all the entire ci process takes 4m 30s to complete! pytest: @@ -80,27 +81,14 @@ jobs: run: docker-compose -f local.yml down {%- else %} - - name: Set up Python 3.9 + - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.9 - - - name: Get pip cache dir - id: pip-cache-location - run: | - echo "::set-output name=dir::$(pip cache dir)" - {%- raw %} - - - name: Cache pip Project Dependencies - uses: actions/cache@v2 - with: - # Get the location of pip cache dir - path: ${{ steps.pip-cache-location.outputs.dir }} - # Look to see if there is a cache hit for the corresponding requirements file - key: ${{ runner.os }}-pip-${{ hashFiles('**/local.txt') }} - restore-keys: | - ${{ runner.os }}-pip- - {%- endraw %} + python-version: "3.9" + cache: pip + cache-dependency-path: | + requirements/base.txt + requirements/local.txt - name: Install Dependencies run: | diff --git a/{{cookiecutter.project_slug}}/.gitignore b/{{cookiecutter.project_slug}}/.gitignore index 613e8beab..d48356fa1 100644 --- a/{{cookiecutter.project_slug}}/.gitignore +++ b/{{cookiecutter.project_slug}}/.gitignore @@ -327,13 +327,20 @@ Session.vim tags ### Project template -{% if cookiecutter.use_mailhog == 'y' and cookiecutter.use_docker == 'n' %} +{%- if cookiecutter.use_mailhog == 'y' and cookiecutter.use_docker == 'n' %} MailHog {%- endif %} {{ cookiecutter.project_slug }}/media/ .pytest_cache/ -{% if cookiecutter.use_docker == 'y' %} +{%- if cookiecutter.use_docker == 'y' %} .ipython/ {%- endif %} + +{%- if cookiecutter.js_task_runner == 'Gulp' %} +project.css +project.min.css +vendors.js +*.min.js +{%- endif %} diff --git a/{{cookiecutter.project_slug}}/.idea/runConfigurations/docker_compose_up_django.xml b/{{cookiecutter.project_slug}}/.idea/runConfigurations/docker_compose_up_django.xml new file mode 100644 index 000000000..67f369a3c --- /dev/null +++ b/{{cookiecutter.project_slug}}/.idea/runConfigurations/docker_compose_up_django.xml @@ -0,0 +1,23 @@ + + + + + + + + + + diff --git a/{{cookiecutter.project_slug}}/.idea/runConfigurations/docker_compose_up_docs.xml b/{{cookiecutter.project_slug}}/.idea/runConfigurations/docker_compose_up_docs.xml new file mode 100644 index 000000000..0f77b28df --- /dev/null +++ b/{{cookiecutter.project_slug}}/.idea/runConfigurations/docker_compose_up_docs.xml @@ -0,0 +1,16 @@ + + + + + + + + + + diff --git a/{{cookiecutter.project_slug}}/.idea/{{cookiecutter.project_slug}}.iml b/{{cookiecutter.project_slug}}/.idea/{{cookiecutter.project_slug}}.iml index d408765a5..289d9716a 100644 --- a/{{cookiecutter.project_slug}}/.idea/{{cookiecutter.project_slug}}.iml +++ b/{{cookiecutter.project_slug}}/.idea/{{cookiecutter.project_slug}}.iml @@ -14,11 +14,11 @@ {% if cookiecutter.js_task_runner != 'None' %} - + - {% else %} - + {% else %} + {% endif %} diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index 5551169eb..301f8b74f 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -1,35 +1,33 @@ -exclude: 'docs|node_modules|migrations|.git|.tox' +exclude: "^docs/|/migrations/" default_stages: [commit] -fail_fast: true repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.0.1 + rev: v4.1.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml - repo: https://github.com/psf/black - rev: 21.7b0 + rev: 21.12b0 hooks: - id: black - - repo: https://github.com/timothycrosley/isort - rev: 5.9.3 + - repo: https://github.com/PyCQA/isort + rev: 5.10.1 hooks: - id: isort - - repo: https://gitlab.com/pycqa/flake8 - rev: 3.9.2 + - repo: https://github.com/PyCQA/flake8 + rev: 4.0.1 hooks: - id: flake8 - args: ['--config=setup.cfg'] + args: ["--config=setup.cfg"] additional_dependencies: [flake8-isort] - # sets up .pre-commit-ci.yaml to ensure pre-commit dependencies stay up to date ci: - autoupdate_schedule: weekly - skip: [] - submodules: false + autoupdate_schedule: weekly + skip: [] + submodules: false diff --git a/{{cookiecutter.project_slug}}/.pylintrc b/{{cookiecutter.project_slug}}/.pylintrc index dff52e75b..6f195c6ef 100644 --- a/{{cookiecutter.project_slug}}/.pylintrc +++ b/{{cookiecutter.project_slug}}/.pylintrc @@ -1,6 +1,6 @@ [MASTER] load-plugins=pylint_django{% if cookiecutter.use_celery == "y" %}, pylint_celery{% endif %} - +django-settings-module=config.settings.base [FORMAT] max-line-length=120 diff --git a/{{cookiecutter.project_slug}}/Procfile b/{{cookiecutter.project_slug}}/Procfile index e23ca13cb..2f2fbe927 100644 --- a/{{cookiecutter.project_slug}}/Procfile +++ b/{{cookiecutter.project_slug}}/Procfile @@ -1,10 +1,10 @@ release: python manage.py migrate -{%- if cookiecutter.use_async == "y" -%} +{%- if cookiecutter.use_async == "y" %} web: gunicorn config.asgi:application -k uvicorn.workers.UvicornWorker -{%- else %} +{%- else %} web: gunicorn config.wsgi:application {%- endif %} -{%- if cookiecutter.use_celery == "y" -%} -worker: REMAP_SIGTERM=SIGQUIT celery worker --app=config.celery_app --loglevel=info -beat: REMAP_SIGTERM=SIGQUIT celery beat --app=config.celery_app --loglevel=info +{%- if cookiecutter.use_celery == "y" %} +worker: REMAP_SIGTERM=SIGQUIT celery -A config.celery_app worker --loglevel=info +beat: REMAP_SIGTERM=SIGQUIT celery -A config.celery_app beat --loglevel=info {%- endif %} diff --git a/{{cookiecutter.project_slug}}/README.md b/{{cookiecutter.project_slug}}/README.md new file mode 100644 index 000000000..227e24c00 --- /dev/null +++ b/{{cookiecutter.project_slug}}/README.md @@ -0,0 +1,143 @@ +# {{cookiecutter.project_name}} + +{{ cookiecutter.description }} + +[![Built with Cookiecutter Django](https://img.shields.io/badge/built%20with-Cookiecutter%20Django-ff69b4.svg?logo=cookiecutter)](https://github.com/cookiecutter/cookiecutter-django/) +[![Black code style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black) + +{%- if cookiecutter.open_source_license != "Not open source" %} + +License: {{cookiecutter.open_source_license}} +{%- endif %} + +## Settings + +Moved to [settings](http://cookiecutter-django.readthedocs.io/en/latest/settings.html). + +## Basic Commands + +### Setting Up Your Users + +- To create a **normal user account**, just go to Sign Up and fill out the form. Once you submit it, you'll see a "Verify Your E-mail Address" page. Go to your console to see a simulated email verification message. Copy the link into your browser. Now the user's email should be verified and ready to go. + +- To create an **superuser account**, use this command: + + $ python manage.py createsuperuser + +For convenience, you can keep your normal user logged in on Chrome and your superuser logged in on Firefox (or similar), so that you can see how the site behaves for both kinds of users. + +### Type checks + +Running type checks with mypy: + + $ mypy {{cookiecutter.project_slug}} + +### Test coverage + +To run the tests, check your test coverage, and generate an HTML coverage report: + + $ coverage run -m pytest + $ coverage html + $ open htmlcov/index.html + +#### Running tests with pytest + + $ pytest + +### Live reloading and Sass CSS compilation + +Moved to [Live reloading and SASS compilation](http://cookiecutter-django.readthedocs.io/en/latest/live-reloading-and-sass-compilation.html). + +{%- if cookiecutter.use_celery == "y" %} + +### Celery + +This app comes with Celery. + +To run a celery worker: + +``` bash +cd {{cookiecutter.project_slug}} +celery -A config.celery_app worker -l info +``` + +Please note: For Celery's import magic to work, it is important *where* the celery commands are run. If you are in the same folder with *manage.py*, you should be right. + +{%- endif %} +{%- if cookiecutter.use_mailhog == "y" %} + +### Email Server + +{%- if cookiecutter.use_docker == "y" %} + +In development, it is often nice to be able to see emails that are being sent from your application. For that reason local SMTP server [MailHog](https://github.com/mailhog/MailHog) with a web interface is available as docker container. + +Container mailhog will start automatically when you will run all docker containers. +Please check [cookiecutter-django Docker documentation](http://cookiecutter-django.readthedocs.io/en/latest/deployment-with-docker.html) for more details how to start all containers. + +With MailHog running, to view messages that are sent by your application, open your browser and go to `http://127.0.0.1:8025` +{%- else %} + +In development, it is often nice to be able to see emails that are being sent from your application. If you choose to use [MailHog](https://github.com/mailhog/MailHog) when generating the project a local SMTP server with a web interface will be available. + +1. [Download the latest MailHog release](https://github.com/mailhog/MailHog/releases) for your OS. + +2. Rename the build to `MailHog`. + +3. Copy the file to the project root. + +4. Make it executable: + + $ chmod +x MailHog + +5. Spin up another terminal window and start it there: + + ./MailHog + +6. Check out to see how it goes. + +Now you have your own mail server running locally, ready to receive whatever you send it. + +{%- endif %} + +{%- endif %} +{%- if cookiecutter.use_sentry == "y" %} + +### Sentry + +Sentry is an error logging aggregator service. You can sign up for a free account at or download and host it yourself. +The system is set up with reasonable defaults, including 404 logging and integration with the WSGI application. + +You must set the DSN url in production. +{%- endif %} + +## Deployment + +The following details how to deploy this application. +{%- if cookiecutter.use_heroku.lower() == "y" %} + +### Heroku + +See detailed [cookiecutter-django Heroku documentation](http://cookiecutter-django.readthedocs.io/en/latest/deployment-on-heroku.html). + +{%- endif %} +{%- if cookiecutter.use_docker.lower() == "y" %} + +### Docker + +See detailed [cookiecutter-django Docker documentation](http://cookiecutter-django.readthedocs.io/en/latest/deployment-with-docker.html). + +{%- endif %} +{%- if cookiecutter.custom_bootstrap_compilation == "y" %} +### Custom Bootstrap Compilation + +The generated CSS is set up with automatic Bootstrap recompilation with variables of your choice. +Bootstrap v5 is installed using npm and customised by tweaking your variables in `static/sass/custom_bootstrap_vars`. + +You can find a list of available variables [in the bootstrap source](https://github.com/twbs/bootstrap/blob/main/scss/_variables.scss), or get explanations on them in the [Bootstrap docs](https://getbootstrap.com/docs/5.1/customize/sass/). + +{%- if cookiecutter.js_task_runner == "Gulp" %} +Bootstrap's javascript as well as its dependencies is concatenated into a single file: `static/js/vendors.js`. +{%- endif %} + +{%- endif %} diff --git a/{{cookiecutter.project_slug}}/README.rst b/{{cookiecutter.project_slug}}/README.rst deleted file mode 100644 index aa4e48d3d..000000000 --- a/{{cookiecutter.project_slug}}/README.rst +++ /dev/null @@ -1,175 +0,0 @@ -{{cookiecutter.project_name}} -{{ '=' * cookiecutter.project_name|length }} - -{{cookiecutter.description}} - -.. image:: https://img.shields.io/badge/built%20with-Cookiecutter%20Django-ff69b4.svg?logo=cookiecutter - :target: https://github.com/pydanny/cookiecutter-django/ - :alt: Built with Cookiecutter Django -.. image:: https://img.shields.io/badge/code%20style-black-000000.svg - :target: https://github.com/ambv/black - :alt: Black code style -{%- if cookiecutter.open_source_license != "Not open source" %} - -:License: {{cookiecutter.open_source_license}} -{%- endif %} - -Settings --------- - -Moved to settings_. - -.. _settings: http://cookiecutter-django.readthedocs.io/en/latest/settings.html - -Basic Commands --------------- - -Setting Up Your Users -^^^^^^^^^^^^^^^^^^^^^ - -* To create a **normal user account**, just go to Sign Up and fill out the form. Once you submit it, you'll see a "Verify Your E-mail Address" page. Go to your console to see a simulated email verification message. Copy the link into your browser. Now the user's email should be verified and ready to go. - -* To create an **superuser account**, use this command:: - - $ python manage.py createsuperuser - -For convenience, you can keep your normal user logged in on Chrome and your superuser logged in on Firefox (or similar), so that you can see how the site behaves for both kinds of users. - -Type checks -^^^^^^^^^^^ - -Running type checks with mypy: - -:: - - $ mypy {{cookiecutter.project_slug}} - -Test coverage -^^^^^^^^^^^^^ - -To run the tests, check your test coverage, and generate an HTML coverage report:: - - $ coverage run -m pytest - $ coverage html - $ open htmlcov/index.html - -Running tests with py.test -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - $ pytest - -Live reloading and Sass CSS compilation -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Moved to `Live reloading and SASS compilation`_. - -.. _`Live reloading and SASS compilation`: http://cookiecutter-django.readthedocs.io/en/latest/live-reloading-and-sass-compilation.html - -{%- if cookiecutter.use_celery == "y" %} - -Celery -^^^^^^ - -This app comes with Celery. - -To run a celery worker: - -.. code-block:: bash - - cd {{cookiecutter.project_slug}} - celery -A config.celery_app worker -l info - -Please note: For Celery's import magic to work, it is important *where* the celery commands are run. If you are in the same folder with *manage.py*, you should be right. - -{%- endif %} -{%- if cookiecutter.use_mailhog == "y" %} - -Email Server -^^^^^^^^^^^^ -{%- if cookiecutter.use_docker == 'y' %} - -In development, it is often nice to be able to see emails that are being sent from your application. For that reason local SMTP server `MailHog`_ with a web interface is available as docker container. - -Container mailhog will start automatically when you will run all docker containers. -Please check `cookiecutter-django Docker documentation`_ for more details how to start all containers. - -With MailHog running, to view messages that are sent by your application, open your browser and go to ``http://127.0.0.1:8025`` -{%- else %} - -In development, it is often nice to be able to see emails that are being sent from your application. If you choose to use `MailHog`_ when generating the project a local SMTP server with a web interface will be available. - -#. `Download the latest MailHog release`_ for your OS. - -#. Rename the build to ``MailHog``. - -#. Copy the file to the project root. - -#. Make it executable: :: - - $ chmod +x MailHog - -#. Spin up another terminal window and start it there: :: - - ./MailHog - -#. Check out ``_ to see how it goes. - -Now you have your own mail server running locally, ready to receive whatever you send it. - -.. _`Download the latest MailHog release`: https://github.com/mailhog/MailHog/releases -{%- endif %} - -.. _mailhog: https://github.com/mailhog/MailHog -{%- endif %} -{%- if cookiecutter.use_sentry == "y" %} - -Sentry -^^^^^^ - -Sentry is an error logging aggregator service. You can sign up for a free account at https://sentry.io/signup/?code=cookiecutter or download and host it yourself. -The system is setup with reasonable defaults, including 404 logging and integration with the WSGI application. - -You must set the DSN url in production. -{%- endif %} - -Deployment ----------- - -The following details how to deploy this application. -{%- if cookiecutter.use_heroku.lower() == "y" %} - -Heroku -^^^^^^ - -See detailed `cookiecutter-django Heroku documentation`_. - -.. _`cookiecutter-django Heroku documentation`: http://cookiecutter-django.readthedocs.io/en/latest/deployment-on-heroku.html -{%- endif %} -{%- if cookiecutter.use_docker.lower() == "y" %} - -Docker -^^^^^^ - -See detailed `cookiecutter-django Docker documentation`_. - -.. _`cookiecutter-django Docker documentation`: http://cookiecutter-django.readthedocs.io/en/latest/deployment-with-docker.html -{%- endif %} -{%- if cookiecutter.custom_bootstrap_compilation == "y" %} -Custom Bootstrap Compilation -^^^^^^ - -The generated CSS is set up with automatic Bootstrap recompilation with variables of your choice. -Bootstrap v4 is installed using npm and customised by tweaking your variables in ``static/sass/custom_bootstrap_vars``. - -You can find a list of available variables `in the bootstrap source`_, or get explanations on them in the `Bootstrap docs`_. - -{%- if cookiecutter.js_task_runner == 'Gulp' %} -Bootstrap's javascript as well as its dependencies is concatenated into a single file: ``static/js/vendors.js``. -{%- endif %} - -.. _in the bootstrap source: https://github.com/twbs/bootstrap/blob/v4-dev/scss/_variables.scss -.. _Bootstrap docs: https://getbootstrap.com/docs/4.1/getting-started/theming/ - -{%- endif %} diff --git a/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile index f1a489a30..044ef4a74 100644 --- a/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile @@ -1,4 +1,4 @@ -ARG PYTHON_VERSION=3.9-slim-buster +ARG PYTHON_VERSION=3.9-slim-bullseye # define an alias for the specfic python version used in this file. FROM python:${PYTHON_VERSION} as python diff --git a/{{cookiecutter.project_slug}}/compose/local/django/celery/flower/start b/{{cookiecutter.project_slug}}/compose/local/django/celery/flower/start index 5bcaa8164..bd3c9f2fd 100644 --- a/{{cookiecutter.project_slug}}/compose/local/django/celery/flower/start +++ b/{{cookiecutter.project_slug}}/compose/local/django/celery/flower/start @@ -4,7 +4,8 @@ set -o errexit set -o nounset -celery flower \ - --app=config.celery_app \ - --broker="${CELERY_BROKER_URL}" \ +celery \ + -A config.celery_app \ + -b "${CELERY_BROKER_URL}" \ + flower \ --basic_auth="${CELERY_FLOWER_USER}:${CELERY_FLOWER_PASSWORD}" diff --git a/{{cookiecutter.project_slug}}/compose/local/docs/Dockerfile b/{{cookiecutter.project_slug}}/compose/local/docs/Dockerfile index fbb5ce9d0..6f1bb8b5e 100644 --- a/{{cookiecutter.project_slug}}/compose/local/docs/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/local/docs/Dockerfile @@ -1,28 +1,61 @@ -FROM python:3.9-slim-buster +ARG PYTHON_VERSION=3.9-slim-bullseye + +# define an alias for the specfic python version used in this file. +FROM python:${PYTHON_VERSION} as python + + +# Python build stage +FROM python as python-build-stage -ENV PYTHONUNBUFFERED 1 ENV PYTHONDONTWRITEBYTECODE 1 -RUN apt-get update \ - # dependencies for building Python packages - && apt-get install -y build-essential \ - # psycopg2 dependencies - && apt-get install -y libpq-dev \ - # Translations dependencies - && apt-get install -y gettext \ - # Uncomment below lines to enable Sphinx output to latex and pdf - # && apt-get install -y texlive-latex-recommended \ - # && apt-get install -y texlive-fonts-recommended \ - # && apt-get install -y texlive-latex-extra \ - # && apt-get install -y latexmk \ - # cleaning up unused files - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ - && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install --no-install-recommends -y \ + # dependencies for building Python packages + build-essential \ + # psycopg2 dependencies + libpq-dev \ + # cleaning up unused files + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ + && rm -rf /var/lib/apt/lists/* # Requirements are installed here to ensure they will be cached. COPY ./requirements /requirements -# All imports needed for autodoc. -RUN pip install -r /requirements/local.txt -r /requirements/production.txt + +# create python dependency wheels +RUN pip wheel --no-cache-dir --no-deps --wheel-dir /usr/src/app/wheels \ + -r /requirements/local.txt -r /requirements/production.txt \ + && rm -rf /requirements + + +# Python 'run' stage +FROM python as python-run-stage + +ARG BUILD_ENVIRONMENT +ENV PYTHONUNBUFFERED 1 +ENV PYTHONDONTWRITEBYTECODE 1 + +RUN apt-get update && apt-get install --no-install-recommends -y \ + # To run the Makefile + make \ + # psycopg2 dependencies + libpq-dev \ + # Translations dependencies + gettext \ + # Uncomment below lines to enable Sphinx output to latex and pdf + # texlive-latex-recommended \ + # texlive-fonts-recommended \ + # texlive-latex-extra \ + # latexmk \ + # cleaning up unused files + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ + && rm -rf /var/lib/apt/lists/* + +# copy python dependency wheels from python-build-stage +COPY --from=python-build-stage /usr/src/app/wheels /wheels + +# use wheels to install python dependencies +RUN pip install --no-cache /wheels/* \ + && rm -rf /wheels COPY ./compose/local/docs/start /start-docs RUN sed -i 's/\r$//g' /start-docs diff --git a/{{cookiecutter.project_slug}}/compose/local/node/Dockerfile b/{{cookiecutter.project_slug}}/compose/local/node/Dockerfile index f9976e206..8062fa689 100644 --- a/{{cookiecutter.project_slug}}/compose/local/node/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/local/node/Dockerfile @@ -1,4 +1,4 @@ -FROM node:10-stretch-slim +FROM node:16-bullseye-slim WORKDIR /app diff --git a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile index 5f1bc78b3..1dd47a2f7 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile @@ -1,7 +1,7 @@ -ARG PYTHON_VERSION=3.9-slim-buster +ARG PYTHON_VERSION=3.9-slim-bullseye {% if cookiecutter.js_task_runner == 'Gulp' -%} -FROM node:10-stretch-slim as client-builder +FROM node:16-bullseye-slim as client-builder ARG APP_HOME=/app WORKDIR ${APP_HOME} diff --git a/{{cookiecutter.project_slug}}/compose/production/django/celery/beat/start b/{{cookiecutter.project_slug}}/compose/production/django/celery/beat/start index 20b93123a..42ddca910 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/celery/beat/start +++ b/{{cookiecutter.project_slug}}/compose/production/django/celery/beat/start @@ -5,4 +5,4 @@ set -o pipefail set -o nounset -celery -A config.celery_app beat -l INFO +exec celery -A config.celery_app beat -l INFO diff --git a/{{cookiecutter.project_slug}}/compose/production/django/celery/flower/start b/{{cookiecutter.project_slug}}/compose/production/django/celery/flower/start index 5bcaa8164..4180d6778 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/celery/flower/start +++ b/{{cookiecutter.project_slug}}/compose/production/django/celery/flower/start @@ -4,7 +4,8 @@ set -o errexit set -o nounset -celery flower \ - --app=config.celery_app \ - --broker="${CELERY_BROKER_URL}" \ +exec celery \ + -A config.celery_app \ + -b "${CELERY_BROKER_URL}" \ + flower \ --basic_auth="${CELERY_FLOWER_USER}:${CELERY_FLOWER_PASSWORD}" diff --git a/{{cookiecutter.project_slug}}/compose/production/django/celery/worker/start b/{{cookiecutter.project_slug}}/compose/production/django/celery/worker/start index 38fb77f35..af0c8f7b5 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/celery/worker/start +++ b/{{cookiecutter.project_slug}}/compose/production/django/celery/worker/start @@ -5,4 +5,4 @@ set -o pipefail set -o nounset -celery -A config.celery_app worker -l INFO +exec celery -A config.celery_app worker -l INFO diff --git a/{{cookiecutter.project_slug}}/compose/production/django/start b/{{cookiecutter.project_slug}}/compose/production/django/start index 1a41ed48d..8e324afe0 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/start +++ b/{{cookiecutter.project_slug}}/compose/production/django/start @@ -27,8 +27,8 @@ if compress_enabled; then python /app/manage.py compress fi {%- endif %} -{% if cookiecutter.use_async == 'y' %} +{%- if cookiecutter.use_async == 'y' %} /usr/local/bin/gunicorn config.asgi --bind 0.0.0.0:5000 --chdir=/app -k uvicorn.workers.UvicornWorker -{% else %} +{%- else %} /usr/local/bin/gunicorn config.wsgi --bind 0.0.0.0:5000 --chdir=/app {%- endif %} diff --git a/{{cookiecutter.project_slug}}/config/settings/base.py b/{{cookiecutter.project_slug}}/config/settings/base.py index 640d8b62c..1598373d3 100644 --- a/{{cookiecutter.project_slug}}/config/settings/base.py +++ b/{{cookiecutter.project_slug}}/config/settings/base.py @@ -48,6 +48,8 @@ DATABASES = { } {%- endif %} DATABASES["default"]["ATOMIC_REQUESTS"] = True +# https://docs.djangoproject.com/en/stable/ref/settings/#std:setting-DEFAULT_AUTO_FIELD +DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" # URLS # ------------------------------------------------------------------------------ @@ -71,6 +73,7 @@ DJANGO_APPS = [ ] THIRD_PARTY_APPS = [ "crispy_forms", + "crispy_bootstrap5", "allauth", "allauth.account", "allauth.socialaccount", @@ -81,11 +84,12 @@ THIRD_PARTY_APPS = [ "rest_framework", "rest_framework.authtoken", "corsheaders", + "drf_spectacular", {%- endif %} ] LOCAL_APPS = [ - "{{ cookiecutter.project_slug }}.users.apps.UsersConfig", + "{{ cookiecutter.project_slug }}.users", # Your stuff: custom apps go here ] # https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps @@ -179,15 +183,11 @@ TEMPLATES = [ { # https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-TEMPLATES-BACKEND "BACKEND": "django.template.backends.django.DjangoTemplates", - # https://docs.djangoproject.com/en/dev/ref/settings/#template-dirs + # https://docs.djangoproject.com/en/dev/ref/settings/#dirs "DIRS": [str(APPS_DIR / "templates")], + # https://docs.djangoproject.com/en/dev/ref/settings/#app-dirs + "APP_DIRS": True, "OPTIONS": { - # https://docs.djangoproject.com/en/dev/ref/settings/#template-loaders - # https://docs.djangoproject.com/en/dev/ref/templates/api/#loader-types - "loaders": [ - "django.template.loaders.filesystem.Loader", - "django.template.loaders.app_directories.Loader", - ], # https://docs.djangoproject.com/en/dev/ref/settings/#template-context-processors "context_processors": [ "django.template.context_processors.debug", @@ -198,7 +198,7 @@ TEMPLATES = [ "django.template.context_processors.static", "django.template.context_processors.tz", "django.contrib.messages.context_processors.messages", - "{{ cookiecutter.project_slug }}.utils.context_processors.settings_context", + "{{cookiecutter.project_slug}}.users.context_processors.allauth_settings", ], }, } @@ -208,7 +208,8 @@ TEMPLATES = [ FORM_RENDERER = "django.forms.renderers.TemplatesSetting" # http://django-crispy-forms.readthedocs.io/en/latest/install.html#template-packs -CRISPY_TEMPLATE_PACK = "bootstrap4" +CRISPY_TEMPLATE_PACK = "bootstrap5" +CRISPY_ALLOWED_TEMPLATE_PACKS = "bootstrap5" # FIXTURES # ------------------------------------------------------------------------------ @@ -306,8 +307,12 @@ ACCOUNT_EMAIL_REQUIRED = True ACCOUNT_EMAIL_VERIFICATION = "mandatory" # https://django-allauth.readthedocs.io/en/latest/configuration.html ACCOUNT_ADAPTER = "{{cookiecutter.project_slug}}.users.adapters.AccountAdapter" +# https://django-allauth.readthedocs.io/en/latest/forms.html +ACCOUNT_FORMS = {"signup": "{{cookiecutter.project_slug}}.users.forms.UserSignupForm"} # https://django-allauth.readthedocs.io/en/latest/configuration.html SOCIALACCOUNT_ADAPTER = "{{cookiecutter.project_slug}}.users.adapters.SocialAccountAdapter" +# https://django-allauth.readthedocs.io/en/latest/forms.html +SOCIALACCOUNT_FORMS = {"signup": "{{cookiecutter.project_slug}}.users.forms.UserSocialSignupForm"} {% if cookiecutter.use_compressor == 'y' -%} # django-compressor # ------------------------------------------------------------------------------ @@ -330,6 +335,18 @@ REST_FRAMEWORK = { # django-cors-headers - https://github.com/adamchainz/django-cors-headers#setup CORS_URLS_REGEX = r"^/api/.*$" +# By Default swagger ui is available only to admin user. You can change permission classs to change that +# See more configuration options at https://drf-spectacular.readthedocs.io/en/latest/settings.html#settings +SPECTACULAR_SETTINGS = { + "TITLE": "{{ cookiecutter.project_name }} API", + "DESCRIPTION": "Documentation of API endpoiints of {{ cookiecutter.project_name }}", + "VERSION": "1.0.0", + "SERVE_PERMISSIONS": ["rest_framework.permissions.IsAdminUser"], + "SERVERS": [ + {"url": "https://127.0.0.1:8000", "description": "Local Development server"}, + {"url": "https://{{ cookiecutter.domain_name }}", "description": "Production server"}, + ], +} {%- endif %} # Your stuff... # ------------------------------------------------------------------------------ diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index a9e38b07a..06eb8d492 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -2,11 +2,11 @@ import logging import sentry_sdk -from sentry_sdk.integrations.django import DjangoIntegration -from sentry_sdk.integrations.logging import LoggingIntegration {%- if cookiecutter.use_celery == 'y' %} from sentry_sdk.integrations.celery import CeleryIntegration -{% endif %} +{%- endif %} +from sentry_sdk.integrations.django import DjangoIntegration +from sentry_sdk.integrations.logging import LoggingIntegration from sentry_sdk.integrations.redis import RedisIntegration {% endif -%} @@ -123,24 +123,12 @@ DEFAULT_FILE_STORAGE = "{{cookiecutter.project_slug}}.utils.storages.MediaRootGo MEDIA_URL = f"https://storage.googleapis.com/{GS_BUCKET_NAME}/media/" {%- endif %} -# TEMPLATES -# ------------------------------------------------------------------------------ -# https://docs.djangoproject.com/en/dev/ref/settings/#templates -TEMPLATES[-1]["OPTIONS"]["loaders"] = [ # type: ignore[index] # noqa F405 - ( - "django.template.loaders.cached.Loader", - [ - "django.template.loaders.filesystem.Loader", - "django.template.loaders.app_directories.Loader", - ], - ) -] - # EMAIL # ------------------------------------------------------------------------------ # https://docs.djangoproject.com/en/dev/ref/settings/#default-from-email DEFAULT_FROM_EMAIL = env( - "DJANGO_DEFAULT_FROM_EMAIL", default="{{cookiecutter.project_name}} " + "DJANGO_DEFAULT_FROM_EMAIL", + default="{{cookiecutter.project_name}} ", ) # https://docs.djangoproject.com/en/dev/ref/settings/#server-email SERVER_EMAIL = env("DJANGO_SERVER_EMAIL", default=DEFAULT_FROM_EMAIL) diff --git a/{{cookiecutter.project_slug}}/config/settings/test.py b/{{cookiecutter.project_slug}}/config/settings/test.py index 222597ad9..78fb6cc66 100644 --- a/{{cookiecutter.project_slug}}/config/settings/test.py +++ b/{{cookiecutter.project_slug}}/config/settings/test.py @@ -20,18 +20,6 @@ TEST_RUNNER = "django.test.runner.DiscoverRunner" # https://docs.djangoproject.com/en/dev/ref/settings/#password-hashers PASSWORD_HASHERS = ["django.contrib.auth.hashers.MD5PasswordHasher"] -# TEMPLATES -# ------------------------------------------------------------------------------ -TEMPLATES[-1]["OPTIONS"]["loaders"] = [ # type: ignore[index] # noqa F405 - ( - "django.template.loaders.cached.Loader", - [ - "django.template.loaders.filesystem.Loader", - "django.template.loaders.app_directories.Loader", - ], - ) -] - # EMAIL # ------------------------------------------------------------------------------ # https://docs.djangoproject.com/en/dev/ref/settings/#email-backend diff --git a/{{cookiecutter.project_slug}}/config/urls.py b/{{cookiecutter.project_slug}}/config/urls.py index 168d77a8b..ab42cc103 100644 --- a/{{cookiecutter.project_slug}}/config/urls.py +++ b/{{cookiecutter.project_slug}}/config/urls.py @@ -8,6 +8,7 @@ from django.urls import include, path from django.views import defaults as default_views from django.views.generic import TemplateView {%- if cookiecutter.use_drf == 'y' %} +from drf_spectacular.views import SpectacularAPIView, SpectacularSwaggerView from rest_framework.authtoken.views import obtain_auth_token {%- endif %} @@ -35,6 +36,12 @@ urlpatterns += [ path("api/", include("config.api_router")), # DRF auth token path("auth-token/", obtain_auth_token), + path("api/schema/", SpectacularAPIView.as_view(), name="api-schema"), + path( + "api/docs/", + SpectacularSwaggerView.as_view(url_name="api-schema"), + name="api-docs", + ), ] {%- endif %} diff --git a/{{cookiecutter.project_slug}}/docs/Makefile b/{{cookiecutter.project_slug}}/docs/Makefile index 0b56e1f86..0c4f9f574 100644 --- a/{{cookiecutter.project_slug}}/docs/Makefile +++ b/{{cookiecutter.project_slug}}/docs/Makefile @@ -4,7 +4,7 @@ # You can set these variables from the command line, and also # from the environment for the first two. SPHINXOPTS ?= -SPHINXBUILD ?= sphinx-build -c . +SPHINXBUILD ?= sphinx-build SOURCEDIR = . BUILDDIR = ./_build {%- if cookiecutter.use_docker == 'y' %} @@ -17,7 +17,7 @@ APP = ../{{cookiecutter.project_slug}} # Put it first so that "make" without argument is like "make help". help: - @$(SPHINXBUILD) help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) -c . # Build, watch and serve docs with live reload livehtml: @@ -28,13 +28,9 @@ livehtml: # Outputs rst files from django application code apidocs: - {%- if cookiecutter.use_docker == 'y' %} - sphinx-apidoc -o $(SOURCEDIR)/api /app - {%- else %} - sphinx-apidoc -o $(SOURCEDIR)/api ../{{cookiecutter.project_slug}} - {%- endif %} + sphinx-apidoc -o $(SOURCEDIR)/api $(APP) # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile - @$(SPHINXBUILD) -b $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) -c . diff --git a/{{cookiecutter.project_slug}}/docs/index.rst b/{{cookiecutter.project_slug}}/docs/index.rst index 5fafc6966..cb4cbaeda 100644 --- a/{{cookiecutter.project_slug}}/docs/index.rst +++ b/{{cookiecutter.project_slug}}/docs/index.rst @@ -10,8 +10,8 @@ Welcome to {{ cookiecutter.project_name }}'s documentation! :maxdepth: 2 :caption: Contents: - howto - pycharm/configuration + howto{% if cookiecutter.use_pycharm == 'y' %} + pycharm/configuration{% endif %} users diff --git a/{{cookiecutter.project_slug}}/gulpfile.js b/{{cookiecutter.project_slug}}/gulpfile.js index 56a08e8fc..0f90be220 100644 --- a/{{cookiecutter.project_slug}}/gulpfile.js +++ b/{{cookiecutter.project_slug}}/gulpfile.js @@ -19,7 +19,7 @@ const plumber = require('gulp-plumber') const postcss = require('gulp-postcss') const reload = browserSync.reload const rename = require('gulp-rename') -const sass = require('gulp-sass') +const sass = require('gulp-sass')(require('sass')) const spawn = require('child_process').spawn const uglify = require('gulp-uglify-es').default @@ -32,8 +32,7 @@ function pathsConfig(appName) { {%- if cookiecutter.custom_bootstrap_compilation == 'y' %} bootstrapSass: `${vendorsRoot}/bootstrap/scss`, vendorsJs: [ - `${vendorsRoot}/jquery/dist/jquery.slim.js`, - `${vendorsRoot}/popper.js/dist/umd/popper.js`, + `${vendorsRoot}/@popperjs/core/dist/umd/popper.js`, `${vendorsRoot}/bootstrap/dist/js/bootstrap.js`, ], {%- endif %} @@ -134,31 +133,33 @@ function runServer(cb) { // Browser sync server for live reload function initBrowserSync() { - browserSync.init( - [ - `${paths.css}/*.css`, - `${paths.js}/*.js`, - `${paths.templates}/*.html` - ], { - // https://www.browsersync.io/docs/options/#option-proxy + browserSync.init( + [ + `${paths.css}/*.css`, + `${paths.js}/*.js`, + `${paths.templates}/*.html` + ], { + {%- if cookiecutter.use_docker == 'y' %} + // https://www.browsersync.io/docs/options/#option-open + // Disable as it doesn't work from inside a container + open: false, + {%- endif %} + // https://www.browsersync.io/docs/options/#option-proxy + proxy: { {%- if cookiecutter.use_docker == 'n' %} - proxy: 'localhost:8000' + target: '127.0.0.1:8000', {%- else %} - proxy: { - target: 'django:8000', - proxyReq: [ - function(proxyReq, req) { - // Assign proxy "host" header same as current request at Browsersync server - proxyReq.setHeader('Host', req.headers.host) - } - ] - }, - // https://www.browsersync.io/docs/options/#option-open - // Disable as it doesn't work from inside a container - open: false + target: 'django:8000', {%- endif %} + proxyReq: [ + function(proxyReq, req) { + // Assign proxy "host" header same as current request at Browsersync server + proxyReq.setHeader('Host', req.headers.host) + } + ] } - ) + } + ) } // Watch diff --git a/{{cookiecutter.project_slug}}/local.yml b/{{cookiecutter.project_slug}}/local.yml index 8cce827c1..5090c5cef 100644 --- a/{{cookiecutter.project_slug}}/local.yml +++ b/{{cookiecutter.project_slug}}/local.yml @@ -1,8 +1,8 @@ version: '3' volumes: - local_postgres_data: {} - local_postgres_data_backups: {} + {{ cookiecutter.project_slug }}_local_postgres_data: {} + {{ cookiecutter.project_slug }}_local_postgres_data_backups: {} services: django:{% if cookiecutter.use_celery == 'y' %} &django{% endif %} @@ -10,9 +10,12 @@ services: context: . dockerfile: ./compose/local/django/Dockerfile image: {{ cookiecutter.project_slug }}_local_django - container_name: django + container_name: {{ cookiecutter.project_slug }}_local_django depends_on: - postgres + {%- if cookiecutter.use_celery == 'y' %} + - redis + {%- endif %} {%- if cookiecutter.use_mailhog == 'y' %} - mailhog {%- endif %} @@ -30,16 +33,16 @@ services: context: . dockerfile: ./compose/production/postgres/Dockerfile image: {{ cookiecutter.project_slug }}_production_postgres - container_name: postgres + container_name: {{ cookiecutter.project_slug }}_local_postgres volumes: - - local_postgres_data:/var/lib/postgresql/data:Z - - local_postgres_data_backups:/backups:z + - {{ cookiecutter.project_slug }}_local_postgres_data:/var/lib/postgresql/data:Z + - {{ cookiecutter.project_slug }}_local_postgres_data_backups:/backups:z env_file: - ./.envs/.local/.postgres docs: image: {{ cookiecutter.project_slug }}_local_docs - container_name: docs + container_name: {{ cookiecutter.project_slug }}_local_docs build: context: . dockerfile: ./compose/local/docs/Dockerfile @@ -56,7 +59,7 @@ services: mailhog: image: mailhog/mailhog:v1.0.0 - container_name: mailhog + container_name: {{ cookiecutter.project_slug }}_local_mailhog ports: - "8025:8025" @@ -65,12 +68,12 @@ services: redis: image: redis:6 - container_name: redis + container_name: {{ cookiecutter.project_slug }}_local_redis celeryworker: <<: *django image: {{ cookiecutter.project_slug }}_local_celeryworker - container_name: celeryworker + container_name: {{ cookiecutter.project_slug }}_local_celeryworker depends_on: - redis - postgres @@ -83,7 +86,7 @@ services: celerybeat: <<: *django image: {{ cookiecutter.project_slug }}_local_celerybeat - container_name: celerybeat + container_name: {{ cookiecutter.project_slug }}_local_celerybeat depends_on: - redis - postgres @@ -96,7 +99,7 @@ services: flower: <<: *django image: {{ cookiecutter.project_slug }}_local_flower - container_name: flower + container_name: {{ cookiecutter.project_slug }}_local_flower ports: - "5555:5555" command: /start-flower @@ -109,7 +112,7 @@ services: context: . dockerfile: ./compose/local/node/Dockerfile image: {{ cookiecutter.project_slug }}_local_node - container_name: node + container_name: {{ cookiecutter.project_slug }}_local_node depends_on: - django volumes: diff --git a/{{cookiecutter.project_slug}}/package.json b/{{cookiecutter.project_slug}}/package.json index 6edf2e114..bff0a34af 100644 --- a/{{cookiecutter.project_slug}}/package.json +++ b/{{cookiecutter.project_slug}}/package.json @@ -3,36 +3,31 @@ "version": "{{ cookiecutter.version }}", "dependencies": {}, "devDependencies": { - {% if cookiecutter.js_task_runner == 'Gulp' -%} - {% if cookiecutter.custom_bootstrap_compilation == 'y' -%} - "bootstrap": "4.3.1", + "bootstrap": "^5.1.3", "gulp-concat": "^2.6.1", - "jquery": "3.3.1", - "popper.js": "1.14.3", - {% endif -%} - "autoprefixer": "^9.4.7", - "browser-sync": "^2.14.0", - "cssnano": "^4.1.10", - "gulp": "^4.0.0", - "gulp-imagemin": "^5.0.3", + "@popperjs/core": "^2.10.2", + "autoprefixer": "^10.4.0", + "browser-sync": "^2.27.7", + "cssnano": "^5.0.11", + "gulp": "^4.0.2", + "gulp-imagemin": "^7.1.0", "gulp-plumber": "^1.2.1", - "gulp-postcss": "^8.0.0", - "gulp-rename": "^1.2.2", - "gulp-sass": "^4.0.2", - "gulp-uglify-es": "^1.0.4", - "pixrem": "^5.0.0" - {%- endif %} + "gulp-postcss": "^9.0.1", + "gulp-rename": "^2.0.0", + "gulp-sass": "^5.0.0", + "gulp-uglify-es": "^3.0.0", + "pixrem": "^5.0.0", + "postcss": "^8.3.11", + "sass": "^1.43.4" }, "engines": { - "node": ">=8" + "node": "16" }, "browserslist": [ "last 2 versions" ], "scripts": { - {% if cookiecutter.js_task_runner == 'Gulp' -%} "dev": "gulp", "build": "gulp generate-assets" - {%- endif %} } } diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 3680b3904..9c2c9b042 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -1,45 +1,48 @@ -pytz==2021.1 # https://github.com/stub42/pytz +pytz==2021.3 # https://github.com/stub42/pytz python-slugify==5.0.2 # https://github.com/un33k/python-slugify -Pillow==8.3.1 # https://github.com/python-pillow/Pillow +Pillow==9.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 +rcssmin==1.1.0 --install-option="--without-c-extensions" # https://github.com/ndparker/rcssmin {%- else %} -rcssmin==1.0.6 # https://github.com/ndparker/rcssmin +rcssmin==1.1.0 # https://github.com/ndparker/rcssmin {%- endif %} {%- endif %} -argon2-cffi==20.1.0 # https://github.com/hynek/argon2_cffi +argon2-cffi==21.3.0 # https://github.com/hynek/argon2_cffi {%- if cookiecutter.use_whitenoise == 'y' %} whitenoise==5.3.0 # https://github.com/evansd/whitenoise {%- endif %} -redis==3.5.3 # https://github.com/andymccurdy/redis-py +redis==4.1.2 # https://github.com/redis/redis-py {%- if cookiecutter.use_docker == "y" or cookiecutter.windows == "n" %} hiredis==2.0.0 # https://github.com/redis/hiredis-py {%- endif %} {%- if cookiecutter.use_celery == "y" %} -celery==4.4.6 # pyup: < 5.0,!=4.4.7 # https://github.com/celery/celery -django-celery-beat==2.2.0 # https://github.com/celery/django-celery-beat +celery==5.2.3 # pyup: < 6.0 # https://github.com/celery/celery +django-celery-beat==2.2.1 # https://github.com/celery/django-celery-beat {%- if cookiecutter.use_docker == 'y' %} -flower==0.9.7 # https://github.com/mher/flower +flower==1.0.0 # https://github.com/mher/flower {%- endif %} {%- endif %} {%- if cookiecutter.use_async == 'y' %} -uvicorn[standard]==0.14.0 # https://github.com/encode/uvicorn +uvicorn[standard]==0.17.0.post1 # https://github.com/encode/uvicorn {%- endif %} # Django # ------------------------------------------------------------------------------ -django==3.1.13 # pyup: < 3.2 # https://www.djangoproject.com/ -django-environ==0.4.5 # https://github.com/joke2k/django-environ -django-model-utils==4.1.1 # https://github.com/jazzband/django-model-utils -django-allauth==0.45.0 # https://github.com/pennersr/django-allauth -django-crispy-forms==1.12.0 # https://github.com/django-crispy-forms/django-crispy-forms +django==3.2.11 # pyup: < 4.0 # https://www.djangoproject.com/ +django-environ==0.8.1 # https://github.com/joke2k/django-environ +django-model-utils==4.2.0 # https://github.com/jazzband/django-model-utils +django-allauth==0.47.0 # https://github.com/pennersr/django-allauth +django-crispy-forms==1.14.0 # https://github.com/django-crispy-forms/django-crispy-forms +crispy-bootstrap5==0.6 # https://github.com/django-crispy-forms/crispy-bootstrap5 {%- if cookiecutter.use_compressor == "y" %} -django-compressor==2.4.1 # https://github.com/django-compressor/django-compressor +django-compressor==3.1 # https://github.com/django-compressor/django-compressor {%- endif %} -django-redis==5.0.0 # https://github.com/jazzband/django-redis +django-redis==5.2.0 # https://github.com/jazzband/django-redis {%- if cookiecutter.use_drf == "y" %} # Django REST Framework -djangorestframework==3.12.4 # https://github.com/encode/django-rest-framework -django-cors-headers==3.7.0 # https://github.com/adamchainz/django-cors-headers +djangorestframework==3.13.1 # https://github.com/encode/django-rest-framework +django-cors-headers==3.11.0 # https://github.com/adamchainz/django-cors-headers +# DRF-spectacular for api documentation +drf-spectacular==0.21.1 {%- endif %} diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 9eab142db..784d02349 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -1,11 +1,11 @@ -r base.txt -Werkzeug==1.0.1 # https://github.com/pallets/werkzeug +Werkzeug[watchdog]==2.0.2 # https://github.com/pallets/werkzeug ipdb==0.13.9 # https://github.com/gotcha/ipdb {%- if cookiecutter.use_docker == 'y' %} -psycopg2==2.9.1 # https://github.com/psycopg/psycopg2 +psycopg2==2.9.3 # https://github.com/psycopg/psycopg2 {%- else %} -psycopg2-binary==2.9.1 # https://github.com/psycopg/psycopg2 +psycopg2-binary==2.9.3 # https://github.com/psycopg/psycopg2 {%- endif %} {%- if cookiecutter.use_async == 'y' or cookiecutter.use_celery == 'y' %} watchgod==0.7 # https://github.com/samuelcolvin/watchgod @@ -13,33 +13,36 @@ watchgod==0.7 # https://github.com/samuelcolvin/watchgod # Testing # ------------------------------------------------------------------------------ -mypy==0.910 # https://github.com/python/mypy -django-stubs==1.8.0 # https://github.com/typeddjango/django-stubs -pytest==6.2.4 # https://github.com/pytest-dev/pytest +mypy==0.931 # https://github.com/python/mypy +django-stubs==1.9.0 # https://github.com/typeddjango/django-stubs +pytest==6.2.5 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.4 # https://github.com/Frozenball/pytest-sugar +{%- if cookiecutter.use_drf == "y" %} +djangorestframework-stubs==1.4.0 # https://github.com/typeddjango/djangorestframework-stubs +{%- endif %} # Documentation # ------------------------------------------------------------------------------ -sphinx==4.1.2 # https://github.com/sphinx-doc/sphinx +sphinx==4.4.0 # https://github.com/sphinx-doc/sphinx sphinx-autobuild==2021.3.14 # https://github.com/GaretJax/sphinx-autobuild # Code quality # ------------------------------------------------------------------------------ -flake8==3.9.2 # https://github.com/PyCQA/flake8 -flake8-isort==4.0.0 # https://github.com/gforcada/flake8-isort -coverage==5.5 # https://github.com/nedbat/coveragepy -black==21.7b0 # https://github.com/psf/black -pylint-django==2.4.4 # https://github.com/PyCQA/pylint-django +flake8==4.0.1 # https://github.com/PyCQA/flake8 +flake8-isort==4.1.1 # https://github.com/gforcada/flake8-isort +coverage==6.3 # https://github.com/nedbat/coveragepy +black==21.12b0 # https://github.com/psf/black +pylint-django==2.5.0 # 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.14.0 # https://github.com/pre-commit/pre-commit +pre-commit==2.17.0 # https://github.com/pre-commit/pre-commit # Django # ------------------------------------------------------------------------------ -factory-boy==3.2.0 # https://github.com/FactoryBoy/factory_boy +factory-boy==3.2.1 # https://github.com/FactoryBoy/factory_boy -django-debug-toolbar==3.2.1 # https://github.com/jazzband/django-debug-toolbar -django-extensions==3.1.3 # https://github.com/django-extensions/django-extensions -django-coverage-plugin==2.0.0 # https://github.com/nedbat/django_coverage_plugin -pytest-django==4.4.0 # https://github.com/pytest-dev/pytest-django +django-debug-toolbar==3.2.4 # https://github.com/jazzband/django-debug-toolbar +django-extensions==3.1.5 # https://github.com/django-extensions/django-extensions +django-coverage-plugin==2.0.2 # https://github.com/nedbat/django_coverage_plugin +pytest-django==4.5.2 # https://github.com/pytest-dev/pytest-django diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 61ca0b970..faefd1245 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -3,12 +3,12 @@ -r base.txt gunicorn==20.1.0 # https://github.com/benoitc/gunicorn -psycopg2==2.9.1 # https://github.com/psycopg/psycopg2 +psycopg2==2.9.3 # https://github.com/psycopg/psycopg2 {%- if cookiecutter.use_whitenoise == 'n' %} Collectfast==2.2.0 # https://github.com/antonagestam/collectfast {%- endif %} {%- if cookiecutter.use_sentry == "y" %} -sentry-sdk==1.3.1 # https://github.com/getsentry/sentry-python +sentry-sdk==1.5.4 # https://github.com/getsentry/sentry-python {%- endif %} {%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %} hiredis==2.0.0 # https://github.com/redis/hiredis-py @@ -17,26 +17,26 @@ hiredis==2.0.0 # https://github.com/redis/hiredis-py # Django # ------------------------------------------------------------------------------ {%- if cookiecutter.cloud_provider == 'AWS' %} -django-storages[boto3]==1.11.1 # https://github.com/jschneier/django-storages +django-storages[boto3]==1.12.3 # https://github.com/jschneier/django-storages {%- elif cookiecutter.cloud_provider == 'GCP' %} -django-storages[google]==1.11.1 # https://github.com/jschneier/django-storages +django-storages[google]==1.12.3 # https://github.com/jschneier/django-storages {%- endif %} {%- if cookiecutter.mail_service == 'Mailgun' %} -django-anymail[mailgun]==8.4 # https://github.com/anymail/django-anymail +django-anymail[mailgun]==8.5 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'Amazon SES' %} -django-anymail[amazon_ses]==8.4 # https://github.com/anymail/django-anymail +django-anymail[amazon_ses]==8.5 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'Mailjet' %} -django-anymail[mailjet]==8.4 # https://github.com/anymail/django-anymail +django-anymail[mailjet]==8.5 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'Mandrill' %} -django-anymail[mandrill]==8.4 # https://github.com/anymail/django-anymail +django-anymail[mandrill]==8.5 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'Postmark' %} -django-anymail[postmark]==8.4 # https://github.com/anymail/django-anymail +django-anymail[postmark]==8.5 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'Sendgrid' %} -django-anymail[sendgrid]==8.4 # https://github.com/anymail/django-anymail +django-anymail[sendgrid]==8.5 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'SendinBlue' %} -django-anymail[sendinblue]==8.4 # https://github.com/anymail/django-anymail +django-anymail[sendinblue]==8.5 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'SparkPost' %} -django-anymail[sparkpost]==8.4 # https://github.com/anymail/django-anymail +django-anymail[sparkpost]==8.5 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'Other SMTP' %} -django-anymail==8.4 # https://github.com/anymail/django-anymail +django-anymail==8.5 # https://github.com/anymail/django-anymail {%- endif %} diff --git a/{{cookiecutter.project_slug}}/runtime.txt b/{{cookiecutter.project_slug}}/runtime.txt index 87665291b..425359e69 100644 --- a/{{cookiecutter.project_slug}}/runtime.txt +++ b/{{cookiecutter.project_slug}}/runtime.txt @@ -1 +1 @@ -python-3.9.4 +python-3.9.9 diff --git a/{{cookiecutter.project_slug}}/setup.cfg b/{{cookiecutter.project_slug}}/setup.cfg index d0ba6387c..dad64e1fa 100644 --- a/{{cookiecutter.project_slug}}/setup.cfg +++ b/{{cookiecutter.project_slug}}/setup.cfg @@ -24,7 +24,7 @@ ignore_missing_imports = True warn_unused_ignores = True warn_redundant_casts = True warn_unused_configs = True -plugins = mypy_django_plugin.main +plugins = mypy_django_plugin.main{% if cookiecutter.use_drf == "y" %}, mypy_drf_plugin.main{% endif %} [mypy.plugins.django-stubs] django_settings_module = config.settings.test diff --git a/{{cookiecutter.project_slug}}/utility/requirements-bullseye.apt b/{{cookiecutter.project_slug}}/utility/requirements-bullseye.apt new file mode 100644 index 000000000..60f602873 --- /dev/null +++ b/{{cookiecutter.project_slug}}/utility/requirements-bullseye.apt @@ -0,0 +1,23 @@ +##basic build dependencies of various Django apps for Debian Bullseye 11.x +#build-essential metapackage install: make, gcc, g++, +build-essential +#required to translate +gettext +python3-dev + +##shared dependencies of: +##Pillow, pylibmc +zlib1g-dev + +##Postgresql and psycopg2 dependencies +libpq-dev + +##Pillow dependencies +libtiff5-dev +libjpeg62-turbo-dev +libfreetype6-dev +liblcms2-dev +libwebp-dev + +##django-extensions +libgraphviz-dev diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0003_set_site_domain_and_name.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0003_set_site_domain_and_name.py index 8f4a8f997..080c734bb 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0003_set_site_domain_and_name.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0003_set_site_domain_and_name.py @@ -7,23 +7,52 @@ from django.conf import settings from django.db import migrations +def _update_or_create_site_with_sequence(site_model, connection, domain, name): + """Update or create the site with default ID and keep the DB sequence in sync.""" + site, created = site_model.objects.update_or_create( + id=settings.SITE_ID, + defaults={ + "domain": domain, + "name": name, + }, + ) + if created: + # We provided the ID explicitly when creating the Site entry, therefore the DB + # sequence to auto-generate them wasn't used and is now out of sync. If we + # don't do anything, we'll get a unique constraint violation the next time a + # site is created. + # To avoid this, we need to manually update DB sequence and make sure it's + # greater than the maximum value. + max_id = site_model.objects.order_by('-id').first().id + with connection.cursor() as cursor: + cursor.execute("SELECT last_value from django_site_id_seq") + (current_id,) = cursor.fetchone() + if current_id <= max_id: + cursor.execute( + "alter sequence django_site_id_seq restart with %s", + [max_id + 1], + ) + + def update_site_forward(apps, schema_editor): """Set site domain and name.""" Site = apps.get_model("sites", "Site") - Site.objects.update_or_create( - id=settings.SITE_ID, - defaults={ - "domain": "{{cookiecutter.domain_name}}", - "name": "{{cookiecutter.project_name}}", - }, + _update_or_create_site_with_sequence( + Site, + schema_editor.connection, + "{{cookiecutter.domain_name}}", + "{{cookiecutter.project_name}}", ) def update_site_backward(apps, schema_editor): """Revert site domain and name to default.""" Site = apps.get_model("sites", "Site") - Site.objects.update_or_create( - id=settings.SITE_ID, defaults={"domain": "example.com", "name": "example.com"} + _update_or_create_site_with_sequence( + Site, + schema_editor.connection, + "example.com", + "example.com", ) diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0004_alter_options_ordering_domain.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0004_alter_options_ordering_domain.py index 00c9a74d3..f7118ca81 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0004_alter_options_ordering_domain.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0004_alter_options_ordering_domain.py @@ -6,12 +6,16 @@ from django.db import migrations class Migration(migrations.Migration): dependencies = [ - ('sites', '0003_set_site_domain_and_name'), + ("sites", "0003_set_site_domain_and_name"), ] operations = [ migrations.AlterModelOptions( - name='site', - options={'ordering': ['domain'], 'verbose_name': 'site', 'verbose_name_plural': 'sites'}, + name="site", + options={ + "ordering": ["domain"], + "verbose_name": "site", + "verbose_name_plural": "sites", + }, ), ] diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/email.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/email.html index 07b5789e6..1faa2b9fd 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/email.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/email.html @@ -66,17 +66,14 @@ window.addEventListener('DOMContentLoaded',function() { const message = "{% translate 'Do you really want to remove the selected e-mail address?' %}"; const actions = document.getElementsByName('action_remove'); if (actions.length) { - actions[0].addEventListener("click", function(e) { + actions[0].addEventListener("click",function(e) { if (!confirm(message)) { e.preventDefault(); } }); } + Array.from(document.getElementsByClassName('form-group')).forEach(x => x.classList.remove('row')); }); - -document.addEventListener('DOMContentLoaded', function() { - $('.form-group').removeClass('row'); -}) {% endblock %} {%- endraw %} diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/login.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/login.html index 8c7b5ae60..25a292eda 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/login.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/login.html @@ -13,25 +13,37 @@ {% get_providers as socialaccount_providers %} {% if socialaccount_providers %} -

{% blocktranslate with site.name as site_name %}Please sign in with one -of your existing third party accounts. Or, sign up -for a {{ site_name }} account and sign in below:{% endblocktranslate %}

+

+ {% translate "Please sign in with one of your existing third party accounts:" %} + {% if ACCOUNT_ALLOW_REGISTRATION %} + {% blocktranslate trimmed %} + Or, sign up + for a {{ site_name }} account and sign in below: + {% endblocktranslate %} + {% endif %} +

-
+
-
    - {% include "socialaccount/snippets/provider_list.html" with process="login" %} -
+
    + {% include "socialaccount/snippets/provider_list.html" with process="login" %} +
- + -
+
-{% include "socialaccount/snippets/login_extra.html" %} + {% include "socialaccount/snippets/login_extra.html" %} {% else %} -

{% blocktranslate %}If you have not created an account yet, then please -sign up first.{% endblocktranslate %}

+ {% if ACCOUNT_ALLOW_REGISTRATION %} +

+ {% blocktranslate trimmed %} + If you have not created an account yet, then please + sign up first. + {% endblocktranslate %} +

+ {% endif %} {% endif %}