From 7b4a0bafb670fb51c061c4f0297a21d05b5fe5db Mon Sep 17 00:00:00 2001 From: Floyd Hightower Date: Mon, 26 Apr 2021 06:43:52 -0400 Subject: [PATCH 001/383] Removing pycharm docs if app does not use pycharm --- {{cookiecutter.project_slug}}/docs/index.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From 6b5ad4e8336d30b2b69b3053403b590c638a573d Mon Sep 17 00:00:00 2001 From: Floyd Hightower Date: Mon, 26 Apr 2021 06:17:02 -0500 Subject: [PATCH 002/383] Adding test to validate pycharm docs are removed appropriately --- tests/test_cookiecutter_generation.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py index 7e585ea40..cbe3324ac 100755 --- a/tests/test_cookiecutter_generation.py +++ b/tests/test_cookiecutter_generation.py @@ -282,3 +282,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 == pycharm_docs_exist From 6f66b330e659c252cf49ed772fee9c1bf334d3dd Mon Sep 17 00:00:00 2001 From: Floyd Hightower Date: Tue, 27 Apr 2021 05:41:00 -0500 Subject: [PATCH 003/383] Running black on updated file --- tests/test_cookiecutter_generation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py index cbe3324ac..f62d4bc9a 100755 --- a/tests/test_cookiecutter_generation.py +++ b/tests/test_cookiecutter_generation.py @@ -297,5 +297,5 @@ def test_pycharm_docs_removed(cookies, context, use_pycharm, pycharm_docs_exist) 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() + has_pycharm_docs = "pycharm/configuration" in f.read() assert has_pycharm_docs == pycharm_docs_exist From ba2f423600a4a0386838c2141d2b509aa49357ca Mon Sep 17 00:00:00 2001 From: Andrew-Chen-Wang Date: Tue, 27 Jul 2021 01:10:18 -0400 Subject: [PATCH 004/383] Add bootstrap5 support + drop IE support Signed-off-by: Andrew-Chen-Wang --- .../config/settings/base.py | 4 +++- .../requirements/base.txt | 1 + .../templates/account/email.html | 5 ++--- .../templates/base.html | 22 +++++++++---------- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/base.py b/{{cookiecutter.project_slug}}/config/settings/base.py index 640d8b62c..bbe45a395 100644 --- a/{{cookiecutter.project_slug}}/config/settings/base.py +++ b/{{cookiecutter.project_slug}}/config/settings/base.py @@ -71,6 +71,7 @@ DJANGO_APPS = [ ] THIRD_PARTY_APPS = [ "crispy_forms", + "crispy_bootstrap5", "allauth", "allauth.account", "allauth.socialaccount", @@ -208,7 +209,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 # ------------------------------------------------------------------------------ diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 250a903e6..b4aecc741 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -34,6 +34,7 @@ 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.44.0 # https://github.com/pennersr/django-allauth django-crispy-forms==1.11.2 # https://github.com/django-crispy-forms/django-crispy-forms +crispy-bootstrap5==0.4 # 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 {%- endif %} 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 055904ae9..0bb32c229 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/email.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/email.html @@ -66,15 +66,14 @@ window.addEventListener('DOMContentLoaded',function() { const message = "{% trans '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')); }); - -$('.form-group').removeClass('row'); {% endblock %} {%- endraw %} diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html index c36794048..25b99b0a1 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html @@ -8,17 +8,12 @@ - - - {% block css %} {%- endraw %}{% if cookiecutter.custom_bootstrap_compilation == "n" %}{% raw %} - + {%- endraw %}{% endif %}{% raw %} @@ -41,11 +36,8 @@ {%- endraw %}{% if cookiecutter.use_compressor == "y" %}{% raw %}{% endcompress %}{% endraw %}{% endif %}{% raw %} {%- endraw %}{% else %}{% raw %} - - - - - + + {%- endraw %}{% endif %}{% raw %} @@ -117,7 +109,13 @@ {% block modal %}{% endblock modal %} {% block inline_javascript %} - {# Script tags with only code, no src (defer by default) #} + {% comment %} + Script tags with only code, no src (defer by default). To run + with a "defer" so that you run run inline code: + + {% endcomment %} {% endblock inline_javascript %} From 7a87b1bd1f906d32b49b490231388ec2c333b996 Mon Sep 17 00:00:00 2001 From: Andrew-Chen-Wang Date: Tue, 27 Jul 2021 01:15:22 -0400 Subject: [PATCH 005/383] Fix gulp package installation (dropped jQuery) * Add defer Signed-off-by: Andrew-Chen-Wang --- {{cookiecutter.project_slug}}/gulpfile.js | 1 - {{cookiecutter.project_slug}}/package.json | 5 ++--- .../{{cookiecutter.project_slug}}/templates/base.html | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/{{cookiecutter.project_slug}}/gulpfile.js b/{{cookiecutter.project_slug}}/gulpfile.js index 56a08e8fc..31aa420ee 100644 --- a/{{cookiecutter.project_slug}}/gulpfile.js +++ b/{{cookiecutter.project_slug}}/gulpfile.js @@ -32,7 +32,6 @@ 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}/bootstrap/dist/js/bootstrap.js`, ], diff --git a/{{cookiecutter.project_slug}}/package.json b/{{cookiecutter.project_slug}}/package.json index 6edf2e114..9748f90cc 100644 --- a/{{cookiecutter.project_slug}}/package.json +++ b/{{cookiecutter.project_slug}}/package.json @@ -5,10 +5,9 @@ "devDependencies": { {% if cookiecutter.js_task_runner == 'Gulp' -%} {% if cookiecutter.custom_bootstrap_compilation == 'y' -%} - "bootstrap": "4.3.1", + "bootstrap": "5.0.2", "gulp-concat": "^2.6.1", - "jquery": "3.3.1", - "popper.js": "1.14.3", + "popper.js": "2.9.2", {% endif -%} "autoprefixer": "^9.4.7", "browser-sync": "^2.14.0", diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html index 25b99b0a1..6f77754fc 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html @@ -37,7 +37,7 @@ {%- endraw %}{% if cookiecutter.use_compressor == "y" %}{% raw %}{% endcompress %}{% endraw %}{% endif %}{% raw %} {%- endraw %}{% else %}{% raw %} - + {%- endraw %}{% endif %}{% raw %} From 30e9e99296d0ab25b13963ec9018eac0b8adb8bc Mon Sep 17 00:00:00 2001 From: Andrew-Chen-Wang Date: Tue, 27 Jul 2021 05:25:05 -0400 Subject: [PATCH 006/383] Add create_django_issue.py script for GitHub actions cron Signed-off-by: Andrew-Chen-Wang --- .github/workflows/django-issue-checker.yml | 29 +++ requirements.txt | 1 + scripts/create_django_issue.py | 279 +++++++++++++++++++++ 3 files changed, 309 insertions(+) create mode 100644 .github/workflows/django-issue-checker.yml create mode 100644 scripts/create_django_issue.py diff --git a/.github/workflows/django-issue-checker.yml b/.github/workflows/django-issue-checker.yml new file mode 100644 index 000000000..6b1b0e700 --- /dev/null +++ b/.github/workflows/django-issue-checker.yml @@ -0,0 +1,29 @@ +# 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: + # Every day at midnight + schedule: + - cron: "0 3 * * *" + # Manual trigger + workflow_dispatch: + + +jobs: + issue-manager: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - 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: Create Django Major Issue + run: python scripts/create_django_issue.py + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/requirements.txt b/requirements.txt index b48a5ab91..67d6c6e2e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -22,3 +22,4 @@ pyyaml==5.4.1 # ------------------------------------------------------------------------------ PyGithub==1.55 jinja2==3.0.1 +requests==2.25.1 diff --git a/scripts/create_django_issue.py b/scripts/create_django_issue.py new file mode 100644 index 000000000..42fd375da --- /dev/null +++ b/scripts/create_django_issue.py @@ -0,0 +1,279 @@ +""" +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. +""" + +import os +from typing import Sequence, TYPE_CHECKING + +import requests +import sys +from pathlib import Path + +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_REPO = "pydanny/cookiecutter-django" + + +def get_package_info(package: str) -> dict: + # "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_package_versions(package_info: dict, reverse=True, *, include_pre=False): + # Mostly used for the Django check really... to get the latest + # package version, you could simple do get_package_info()["info"]["version"] + releases: Sequence[str] = package_info["releases"].keys() + if not include_pre: + releases = [x for x in releases if x.replace(".", "").isdigit()] + return sorted(releases, reverse=reverse) + + +def get_name_and_version(requirements_line: str) -> list[str, str]: + return requirements_line.split(" ", 1)[0].split("==") + + +def get_all_latest_django_versions() -> tuple[str, list[str]]: + """ + Grabs all Django versions that are worthy of a GitHub issue. Depends on + if Django versions has higher major version or minor version + """ + 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 + base_django_version = get_name_and_version(line)[1].split(".") + django_versions = get_package_versions(get_package_info("django"), include_pre=True) + _needed_django_versions: set[tuple] = set() + actual_needed_django_versions: list[str] = [] + for x in django_versions: + _version = x.split(".") + # Compare if major is higher or if minor is higher iff major is the same + if (_version[0] > base_django_version[0]) or ( + _version[0] == base_django_version[0] + and _version[1] > base_django_version[1] + ): + will_add = (_version[0], _version[1]) + if will_add not in _needed_django_versions: + _needed_django_versions.add(will_add) + actual_needed_django_versions.append(x) + + return line, actual_needed_django_versions + + +def get_first_digit(tokens) -> str: + return next(item for item in tokens if item.isdigit()) + + +_TABLE_HEADER = """{file}.txt + +| Name | Version in Master | {dj_version} Compatible Version | OK | +| ---- | :---------------: | :-----------------------------: | :-: | +""" +VITAL_BUT_UNKNOWN = [ + "django-environ", # not updated often + "pylint-django", # classifier not included in setup.py +] + + +class GitHubManager: + def __init__(self, base_dj_version: str, needed_dj_versions: list[str]): + self.github = Github(os.getenv("GITHUB_TOKEN", None)) + 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[str, "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): + 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: + 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 the needed""" + qualifiers = { + "repo": GITHUB_REPO, + "author": "actions-user", + "state": "open", + "is": "issue", + "in": "title", + } + issues = list( + self.github.search_issues( + "[Django Update]", "created", "desc", **qualifiers + ) + ) + for issue in issues: + try: + dj_version = get_first_digit(issue.title.split(" ")) + except StopIteration: + try: + # Some padding; randomly chose 4 to make sure we don't get a random + # version number from a package that's not Django + dj_version = get_first_digit(issue.body.split(" ", 4)) + except StopIteration: + print( + f"Found issue {issue.title} that had an invalid syntax", + "(Did not have a Django version number in the title or body's" + f" first word. Issue number: [{issue.id}]({issue.url}))" + ) + continue + if self.base_dj_version > dj_version: + issue.edit(state="closed") + print(f"Closed issue {issue.title} (ID: [{issue.id}]({issue.url}))") + try: + self.needed_dj_versions.remove(dj_version) + except ValueError: + print("Something weird happened. Continuing anyway (Warning ID: 1)") + else: + self.existing_issues[dj_version] = issue + + def get_compatibility( + self, package_name: str, package_info: dict, needed_dj_version + ): + """ + 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 = 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 = [] + for classifier in package_info["info"]["classifiers"]: + # Usually in the form of "Framework :: Django :: 3.2" + tokens = classifier.split(" ") + for token in tokens: + if token.lower() == "django": + try: + _version = get_first_digit(reversed(tokens)) + except StopIteration: + pass + else: + supported_dj_versions.append( + float(".".join(_version.split(".", 2)[:2])) + ) + + if supported_dj_versions: + needed_dj_version = float(needed_dj_version) + if any(x >= needed_dj_version for x in supported_dj_versions): + return package_info["info"]["version"], "✅" + else: + return "", "❌" + + # Django classifier DNE; assume it just 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(x) for x 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: str): + 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}|{compat_version}|{icon}|" + ) + return requirements + + def create_or_edit_issue(self, needed_dj_version, description): + if issue := self.existing_issues.get(str(needed_dj_version)): + issue.edit(body=description) + else: + self.repo.create_issue( + f"[Update Django] Django {needed_dj_version}", description + ) + + def generate(self): + for version in self.needed_dj_versions: + self.create_or_edit_issue(version, self.generate_markdown(version)) + + +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__": + main() From 5f70a802a6524ad85ecddefcf517a2d34ad6c5e4 Mon Sep 17 00:00:00 2001 From: Andrew Chen Wang <60190294+Andrew-Chen-Wang@users.noreply.github.com> Date: Tue, 27 Jul 2021 19:39:15 -0400 Subject: [PATCH 007/383] Fix popper package installation Co-authored-by: Steve Putman --- {{cookiecutter.project_slug}}/gulpfile.js | 2 +- {{cookiecutter.project_slug}}/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/gulpfile.js b/{{cookiecutter.project_slug}}/gulpfile.js index 31aa420ee..06d2cde16 100644 --- a/{{cookiecutter.project_slug}}/gulpfile.js +++ b/{{cookiecutter.project_slug}}/gulpfile.js @@ -32,7 +32,7 @@ function pathsConfig(appName) { {%- if cookiecutter.custom_bootstrap_compilation == 'y' %} bootstrapSass: `${vendorsRoot}/bootstrap/scss`, vendorsJs: [ - `${vendorsRoot}/popper.js/dist/umd/popper.js`, + `${vendorsRoot}/@popperjs/core/dist/umd/popper.js`, `${vendorsRoot}/bootstrap/dist/js/bootstrap.js`, ], {%- endif %} diff --git a/{{cookiecutter.project_slug}}/package.json b/{{cookiecutter.project_slug}}/package.json index 9748f90cc..95df37034 100644 --- a/{{cookiecutter.project_slug}}/package.json +++ b/{{cookiecutter.project_slug}}/package.json @@ -7,7 +7,7 @@ {% if cookiecutter.custom_bootstrap_compilation == 'y' -%} "bootstrap": "5.0.2", "gulp-concat": "^2.6.1", - "popper.js": "2.9.2", + "@popperjs/core": "2.9.2", {% endif -%} "autoprefixer": "^9.4.7", "browser-sync": "^2.14.0", From 8c3e85a7a10d83560bb74a564e787e28b5822c52 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sat, 14 Aug 2021 07:14:13 -0700 Subject: [PATCH 008/383] Update uvicorn from 0.14.0 to 0.15.0 --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 3680b3904..17c3d932c 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -24,7 +24,7 @@ flower==0.9.7 # 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.15.0 # https://github.com/encode/uvicorn {%- endif %} # Django From 7ebe768d60520cefa1490f5636794e0ca54e7a98 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sun, 15 Aug 2021 07:20:08 -0700 Subject: [PATCH 009/383] Update django-cors-headers from 3.7.0 to 3.8.0 --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 3680b3904..36166aaf9 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -41,5 +41,5 @@ django-redis==5.0.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 +django-cors-headers==3.8.0 # https://github.com/adamchainz/django-cors-headers {%- endif %} From 0f4e4ee7c113120e2ad1715e73167cd85d388f12 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sun, 15 Aug 2021 07:20:11 -0700 Subject: [PATCH 010/383] Update django-debug-toolbar from 3.2.1 to 3.2.2 --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 9eab142db..a092dbb12 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -39,7 +39,7 @@ pre-commit==2.14.0 # https://github.com/pre-commit/pre-commit # ------------------------------------------------------------------------------ factory-boy==3.2.0 # https://github.com/FactoryBoy/factory_boy -django-debug-toolbar==3.2.1 # https://github.com/jazzband/django-debug-toolbar +django-debug-toolbar==3.2.2 # 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 From 5529c44b16331b5fbabd30db29fe11d3588361e8 Mon Sep 17 00:00:00 2001 From: Charlie Macfarlane Brodie Date: Tue, 17 Aug 2021 09:44:45 +0100 Subject: [PATCH 011/383] Update available postgres versions The listed versions in the documentation were out of sync with those given when running cookiecutter as recommended in the documentation. --- docs/project-generation-options.rst | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/project-generation-options.rst b/docs/project-generation-options.rst index 8a81e19de..a2573b94d 100644 --- a/docs/project-generation-options.rst +++ b/docs/project-generation-options.rst @@ -49,11 +49,10 @@ 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. 13.2 + 2. 12.6 + 3. 11.11 + 4. 10.16 js_task_runner: Select a JavaScript task runner. The choices are: From 7e49a1c9c72ab5743abc0aea112a7f57397af6ce Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrionuevo da Luz" Date: Thu, 19 Aug 2021 09:30:42 -0300 Subject: [PATCH 012/383] Fix Jinja2 break line control on Procfile --- {{cookiecutter.project_slug}}/Procfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/{{cookiecutter.project_slug}}/Procfile b/{{cookiecutter.project_slug}}/Procfile index e23ca13cb..ddb5cd8a9 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" -%} +{% 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 {%- endif %} From a4a6cbf90c5c74403d3a7c980b9af7f68783cb4a Mon Sep 17 00:00:00 2001 From: Keith Callenberg Date: Thu, 19 Aug 2021 16:43:44 -0400 Subject: [PATCH 013/383] Fix several minor typos --- docs/developing-locally-docker.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/developing-locally-docker.rst b/docs/developing-locally-docker.rst index 858f89b88..bdfff2545 100644 --- a/docs/developing-locally-docker.rst +++ b/docs/developing-locally-docker.rst @@ -213,7 +213,7 @@ 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** @@ -233,14 +233,14 @@ On order to create a secure environment, we need to have a trusted SSL certficat .. _`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 ~~~~~~~~~ @@ -264,7 +264,7 @@ local.yml ... -#. 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. From d5ebb1f7bf5ba5e0c957687f4b360a3bb43383c5 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Fri, 20 Aug 2021 02:12:15 +0000 Subject: [PATCH 014/383] Update Changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 110c3b3f0..f7cdefba2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## [2021-08-19] +### Changed +- Fix several minor typos ([#3301](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3301)) + ## [2021-08-13] ### Changed - Upgrade to Redis 6 ([#3255](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3255)) From e205372b20585e218d007db4235ad3db06285dda Mon Sep 17 00:00:00 2001 From: browniebroke Date: Sat, 21 Aug 2021 02:14:13 +0000 Subject: [PATCH 015/383] Update Changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7cdefba2..5c0229e11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## [2021-08-20] +### Changed +- Fix Jinja2 break line control on Procfile ([#3300](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3300)) + ## [2021-08-19] ### Changed - Fix several minor typos ([#3301](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3301)) From bc87b254becb1a7ce812edbfc023d04739b00c31 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sun, 22 Aug 2021 20:03:39 -0700 Subject: [PATCH 016/383] Update tox from 3.24.1 to 3.24.3 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 57541921e..3fdf2cde4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ pre-commit==2.14.0 # Testing # ------------------------------------------------------------------------------ -tox==3.24.1 +tox==3.24.3 pytest==6.2.4 pytest-cookies==0.6.1 pytest-instafail==0.4.2 From af47398dddbed7d3c4b77978dbfcf32df7e9e956 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 05:02:27 +0000 Subject: [PATCH 017/383] Bump peter-evans/create-pull-request from 3.10.0 to 3.10.1 Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 3.10.0 to 3.10.1. - [Release notes](https://github.com/peter-evans/create-pull-request/releases) - [Commits](https://github.com/peter-evans/create-pull-request/compare/v3.10.0...v3.10.1) --- updated-dependencies: - dependency-name: peter-evans/create-pull-request dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/pre-commit-autoupdate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit-autoupdate.yml b/.github/workflows/pre-commit-autoupdate.yml index 25a6f7a0a..255122002 100644 --- a/.github/workflows/pre-commit-autoupdate.yml +++ b/.github/workflows/pre-commit-autoupdate.yml @@ -26,7 +26,7 @@ jobs: run: pre-commit autoupdate - name: Create Pull Request - uses: peter-evans/create-pull-request@v3.10.0 + uses: peter-evans/create-pull-request@v3.10.1 with: token: ${{ secrets.GITHUB_TOKEN }} branch: update/pre-commit-autoupdate From adbab90c2ed69a40c3e0aa2c876a6371c01ec20e Mon Sep 17 00:00:00 2001 From: browniebroke Date: Sat, 28 Aug 2021 02:13:27 +0000 Subject: [PATCH 018/383] Update Changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c0229e11..6376c0cf1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## [2021-08-27] +### Updated +- Update tox to 3.24.3 ([#3302](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3302)) + ## [2021-08-20] ### Changed - Fix Jinja2 break line control on Procfile ([#3300](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3300)) From 2afeae260b448b63820ca803c7ea5ce6549f1a8f Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sun, 29 Aug 2021 10:29:42 -0700 Subject: [PATCH 019/383] Update argon2-cffi from 20.1.0 to 21.1.0 --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 3680b3904..165ee197d 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -8,7 +8,7 @@ rcssmin==1.0.6 --install-option="--without-c-extensions" # https://github.com/n rcssmin==1.0.6 # https://github.com/ndparker/rcssmin {%- endif %} {%- endif %} -argon2-cffi==20.1.0 # https://github.com/hynek/argon2_cffi +argon2-cffi==21.1.0 # https://github.com/hynek/argon2_cffi {%- if cookiecutter.use_whitenoise == 'y' %} whitenoise==5.3.0 # https://github.com/evansd/whitenoise {%- endif %} From 59ab2b1ac80e0d27932f4adc6d15ac33029a214f Mon Sep 17 00:00:00 2001 From: browniebroke Date: Mon, 30 Aug 2021 00:04:53 +0000 Subject: [PATCH 020/383] Auto-update pre-commit hooks --- {{cookiecutter.project_slug}}/.pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index 5551169eb..e397722b3 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -11,7 +11,7 @@ repos: - id: check-yaml - repo: https://github.com/psf/black - rev: 21.7b0 + rev: 21.8b0 hooks: - id: black From caa255ce1a40861dfc5e922d1b3d6ff0e0bc7672 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sun, 29 Aug 2021 17:04:59 -0700 Subject: [PATCH 021/383] Update black from 21.7b0 to 21.8b0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 3fdf2cde4..67328f853 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ binaryornot==0.4.4 # Code quality # ------------------------------------------------------------------------------ -black==21.7b0 +black==21.8b0 isort==5.9.3 flake8==3.9.2 flake8-isort==4.0.0 From 8325dfa23285429389ee3f4a687579c1d87e7518 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sun, 29 Aug 2021 17:04:59 -0700 Subject: [PATCH 022/383] Update black from 21.7b0 to 21.8b0 --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 9eab142db..a763d4ae9 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -28,7 +28,7 @@ sphinx-autobuild==2021.3.14 # https://github.com/GaretJax/sphinx-autobuild 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 +black==21.8b0 # https://github.com/psf/black pylint-django==2.4.4 # https://github.com/PyCQA/pylint-django {%- if cookiecutter.use_celery == 'y' %} pylint-celery==0.3 # https://github.com/PyCQA/pylint-celery From e4b39897c7cd3d530d04be605f4b416146aa6fb0 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Tue, 31 Aug 2021 08:58:32 -0700 Subject: [PATCH 023/383] Update pytest from 6.2.4 to 6.2.5 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 3fdf2cde4..eb8cb56c3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,7 +13,7 @@ pre-commit==2.14.0 # Testing # ------------------------------------------------------------------------------ tox==3.24.3 -pytest==6.2.4 +pytest==6.2.5 pytest-cookies==0.6.1 pytest-instafail==0.4.2 pyyaml==5.4.1 From 6ca683722c0386fbe3325a3db5e0f98968bf19c7 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Tue, 31 Aug 2021 08:58:32 -0700 Subject: [PATCH 024/383] Update pytest from 6.2.4 to 6.2.5 --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 9eab142db..ef6e941d4 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -15,7 +15,7 @@ watchgod==0.7 # https://github.com/samuelcolvin/watchgod # ------------------------------------------------------------------------------ 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 +pytest==6.2.5 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.4 # https://github.com/Frozenball/pytest-sugar # Documentation From cf6323af2cb245a71facc1abc8874e92e2ae624c Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Tue, 31 Aug 2021 08:58:34 -0700 Subject: [PATCH 025/383] Update django-environ from 0.4.5 to 0.5.0 --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 3680b3904..c7eeaf8ea 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -30,7 +30,7 @@ uvicorn[standard]==0.14.0 # https://github.com/encode/uvicorn # Django # ------------------------------------------------------------------------------ django==3.1.13 # pyup: < 3.2 # https://www.djangoproject.com/ -django-environ==0.4.5 # https://github.com/joke2k/django-environ +django-environ==0.5.0 # 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 From 1ebadc74f476f674b5ede32dc80defd95e4e991b Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Thu, 2 Sep 2021 13:43:44 -0700 Subject: [PATCH 026/383] Update pillow from 8.3.1 to 8.3.2 --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 3680b3904..caddeba94 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -1,6 +1,6 @@ pytz==2021.1 # 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==8.3.2 # 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 From f0d72fd32974849ca412e463f60dfdeb1416e701 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Thu, 2 Sep 2021 19:44:16 -0700 Subject: [PATCH 027/383] Update pre-commit from 2.14.0 to 2.15.0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 3fdf2cde4..ccb613ba9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,7 @@ black==21.7b0 isort==5.9.3 flake8==3.9.2 flake8-isort==4.0.0 -pre-commit==2.14.0 +pre-commit==2.15.0 # Testing # ------------------------------------------------------------------------------ From b2c26bba5b4b2422b885ef6a3ea079846e82aae3 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Thu, 2 Sep 2021 19:44:16 -0700 Subject: [PATCH 028/383] Update pre-commit from 2.14.0 to 2.15.0 --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 9eab142db..ca080c1a8 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -33,7 +33,7 @@ pylint-django==2.4.4 # 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.15.0 # https://github.com/pre-commit/pre-commit # Django # ------------------------------------------------------------------------------ From 2fdece533ef341e49e4163f1510d234b7ae9bb9e Mon Sep 17 00:00:00 2001 From: browniebroke Date: Fri, 3 Sep 2021 17:16:09 +0000 Subject: [PATCH 029/383] Update Contributors --- .github/contributors.json | 5 +++++ CONTRIBUTORS.md | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/.github/contributors.json b/.github/contributors.json index c4cbb38d7..045c1f071 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1127,5 +1127,10 @@ "name": "Mike97M", "github_login": "Mike97M", "twitter_username": "" + }, + { + "name": "Charlie Macfarlane Brodie", + "github_login": "tannart", + "twitter_username": "" } ] \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 388baa385..f75e34c99 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -390,6 +390,13 @@ Listed in alphabetical order. + + Charlie Macfarlane Brodie + + tannart + + + Charlie Smith From db09f07eb9ecfefebefe205deea6e1d4ef57ae12 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Tue, 27 Jul 2021 14:05:01 +0200 Subject: [PATCH 030/383] Update Celery to v5 --- {{cookiecutter.project_slug}}/requirements/base.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 94ab4485e..8d5531f45 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -17,10 +17,10 @@ redis==3.5.3 # https://github.com/andymccurdy/redis-py 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.1.2 # 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' %} From 9cfb7646cb0bb1f5e89929ad3fbe922dd0825a38 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Fri, 3 Sep 2021 19:16:08 +0100 Subject: [PATCH 031/383] Update command line for Flower --- .../compose/local/django/celery/flower/start | 7 ++++--- .../compose/production/django/celery/flower/start | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) 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/production/django/celery/flower/start b/{{cookiecutter.project_slug}}/compose/production/django/celery/flower/start index 5bcaa8164..bd3c9f2fd 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}" \ +celery \ + -A config.celery_app \ + -b "${CELERY_BROKER_URL}" \ + flower \ --basic_auth="${CELERY_FLOWER_USER}:${CELERY_FLOWER_PASSWORD}" From d74bd51a64d5383a345f19191dc30520753f8187 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Fri, 3 Sep 2021 19:17:23 +0100 Subject: [PATCH 032/383] Update Celery command line on Heroku --- {{cookiecutter.project_slug}}/Procfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/Procfile b/{{cookiecutter.project_slug}}/Procfile index ddb5cd8a9..274108d14 100644 --- a/{{cookiecutter.project_slug}}/Procfile +++ b/{{cookiecutter.project_slug}}/Procfile @@ -5,6 +5,6 @@ web: gunicorn config.asgi:application -k uvicorn.workers.UvicornWorker 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 +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 %} From bd5ce0edfa8823fe2592b0a4daba95863315a41a Mon Sep 17 00:00:00 2001 From: browniebroke Date: Sat, 4 Sep 2021 02:14:51 +0000 Subject: [PATCH 033/383] Update Changelog --- CHANGELOG.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6376c0cf1..243c2079a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,22 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## [2021-09-03] +### Changed +- Update available postgres versions ([#3297](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3297)) +### Updated +- Update pre-commit to 2.15.0 ([#3313](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3313)) +- Auto-update pre-commit hooks ([#3307](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3307)) +- Update pillow to 8.3.2 ([#3312](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3312)) +- Update django-environ to 0.5.0 ([#3311](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3311)) +- Update pytest to 6.2.5 ([#3310](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3310)) +- Update black to 21.8b0 ([#3308](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3308)) +- Update argon2-cffi to 21.1.0 ([#3306](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3306)) +- Bump peter-evans/create-pull-request from 3.10.0 to 3.10.1 ([#3303](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3303)) +- Update django-debug-toolbar to 3.2.2 ([#3296](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3296)) +- Update django-cors-headers to 3.8.0 ([#3295](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3295)) +- Update uvicorn to 0.15.0 ([#3294](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3294)) + ## [2021-08-27] ### Updated - Update tox to 3.24.3 ([#3302](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3302)) From 0d88e6aaabb282b734ec14af1ca85cc574f94225 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sat, 4 Sep 2021 09:05:57 -0700 Subject: [PATCH 034/383] Update django-environ from 0.5.0 to 0.6.0 --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 94ab4485e..917fada69 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -30,7 +30,7 @@ uvicorn[standard]==0.15.0 # https://github.com/encode/uvicorn # Django # ------------------------------------------------------------------------------ django==3.1.13 # pyup: < 3.2 # https://www.djangoproject.com/ -django-environ==0.5.0 # https://github.com/joke2k/django-environ +django-environ==0.6.0 # 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 From eecdc45dd72c36ed5d1323dc60aba97c209114f3 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Mon, 6 Sep 2021 02:16:01 +0000 Subject: [PATCH 035/383] Update Changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 243c2079a..aa36f5906 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## [2021-09-05] +### Updated +- Update django-environ to 0.6.0 ([#3314](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3314)) + ## [2021-09-03] ### Changed - Update available postgres versions ([#3297](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3297)) From 34da2fa94b6e5a023d3492a0c7b1f2ecae815049 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Tue, 7 Sep 2021 02:12:27 +0000 Subject: [PATCH 036/383] Update Changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa36f5906..3d3c1b958 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## [2021-09-06] +### Changed +- Update Celery to v5 ([#3280](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3280)) + ## [2021-09-05] ### Updated - Update django-environ to 0.6.0 ([#3314](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3314)) From 7b70f576e760cab0ef76efeea06636609d9a88ad Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sat, 11 Sep 2021 09:42:13 -0700 Subject: [PATCH 037/383] Update django-environ from 0.6.0 to 0.7.0 --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 59b4a6f0f..726e2d214 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -30,7 +30,7 @@ uvicorn[standard]==0.15.0 # https://github.com/encode/uvicorn # Django # ------------------------------------------------------------------------------ django==3.1.13 # pyup: < 3.2 # https://www.djangoproject.com/ -django-environ==0.6.0 # https://github.com/joke2k/django-environ +django-environ==0.7.0 # 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 From b7de132d31e94832757ccf4770d5a7685e54c8e3 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sat, 11 Sep 2021 17:48:47 +0100 Subject: [PATCH 038/383] Compare boolean with is instead of equality --- tests/test_cookiecutter_generation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py index f62d4bc9a..295e9c5fe 100755 --- a/tests/test_cookiecutter_generation.py +++ b/tests/test_cookiecutter_generation.py @@ -298,4 +298,4 @@ def test_pycharm_docs_removed(cookies, context, use_pycharm, pycharm_docs_exist) with open(f"{result.project}/docs/index.rst", "r") as f: has_pycharm_docs = "pycharm/configuration" in f.read() - assert has_pycharm_docs == pycharm_docs_exist + assert has_pycharm_docs is pycharm_docs_exist From 46512acfee003a16f5a241d384874edeec0172d7 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Sat, 11 Sep 2021 16:55:41 +0000 Subject: [PATCH 039/383] Update Contributors --- .github/contributors.json | 5 +++++ CONTRIBUTORS.md | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/.github/contributors.json b/.github/contributors.json index 045c1f071..de5807e0c 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1132,5 +1132,10 @@ "name": "Charlie Macfarlane Brodie", "github_login": "tannart", "twitter_username": "" + }, + { + "name": "Floyd Hightower", + "github_login": "fhightower", + "twitter_username": "" } ] \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index f75e34c99..b655f8fb9 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -691,6 +691,13 @@ Listed in alphabetical order. windrush + + Floyd Hightower + + fhightower + + + Gabriel Mejia From 40598448e20d785a717c885bdfa8647cf070c5b6 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sat, 11 Sep 2021 18:03:46 +0100 Subject: [PATCH 040/383] Upgrade Heroku runtime to ptyhon 3.9.7 --- {{cookiecutter.project_slug}}/runtime.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/runtime.txt b/{{cookiecutter.project_slug}}/runtime.txt index 87665291b..2153d1e15 100644 --- a/{{cookiecutter.project_slug}}/runtime.txt +++ b/{{cookiecutter.project_slug}}/runtime.txt @@ -1 +1 @@ -python-3.9.4 +python-3.9.7 From 7412a3e4a7e0be4bc8884cf7465f3fe179cb0850 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sat, 11 Sep 2021 18:10:22 +0100 Subject: [PATCH 041/383] Replace .sr-only by .visually-hidden --- .../{{cookiecutter.project_slug}}/templates/base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html index b7a7abb94..3953f1702 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html @@ -62,7 +62,7 @@