From 68fac268c4084c2af825cd1a88c80ba4d5649007 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 16:42:30 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.8.2 → v0.8.3](https://github.com/astral-sh/ruff-pre-commit/compare/v0.8.2...v0.8.3) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 395f1b5..c61ab5f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ repos: - id: check-yaml - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.8.2 + rev: v0.8.3 hooks: - id: ruff args: [--fix] From 24ac803d5595c1207ae362d734fb4a342680284a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 16:44:14 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- examples/default/default/settings.py | 6 ++++-- examples/default/pyproject.toml | 6 +++--- examples/default/templates/500.html | 1 + examples/default/templates/base.html | 13 +++++++++++++ examples/postgis/default/settings.py | 6 ++++-- examples/postgis/pyproject.toml | 6 +++--- examples/postgis/templates/base.html | 13 +++++++++++++ examples/with_vite/pyproject.toml | 12 ++++++------ examples/with_vite/templates/index.html | 1 + examples/with_vite/with_vite/settings.py | 6 ++++-- 10 files changed, 52 insertions(+), 18 deletions(-) diff --git a/examples/default/default/settings.py b/examples/default/default/settings.py index 8cadba4..e425263 100644 --- a/examples/default/default/settings.py +++ b/examples/default/default/settings.py @@ -56,7 +56,9 @@ # 1. Django Core Settings # https://docs.djangoproject.com/en/5.1/ref/settings/ -ALLOWED_HOSTS = env.list("ALLOWED_HOSTS", default=["*"] if DEBUG else ["localhost"], subcast=str) +ALLOWED_HOSTS = env.list( + "ALLOWED_HOSTS", default=["*"] if DEBUG else ["localhost"], subcast=str +) ASGI_APPLICATION = "default.asgi.application" @@ -446,7 +448,7 @@ ) # sentry -if PROD and(SENTRY_DSN := env.url("SENTRY_DSN", default=None)).scheme: +if PROD and (SENTRY_DSN := env.url("SENTRY_DSN", default=None)).scheme: sentry_sdk.init( dsn=SENTRY_DSN.geturl(), environment=env.str( diff --git a/examples/default/pyproject.toml b/examples/default/pyproject.toml index 8f8d912..e39ef1a 100644 --- a/examples/default/pyproject.toml +++ b/examples/default/pyproject.toml @@ -41,11 +41,11 @@ dependencies = [ "openpyxl", "psycopg[binary, pool]", "sentry-sdk[django]", - "whitenoise", + "whitenoise" ] +dynamic = ["version"] name = "default" requires-python = ">=3.12" -dynamic = ["version"] [project.optional-dependencies] docs = [ @@ -76,7 +76,7 @@ types = [ "django-stubs", "mypy", "types-croniter", - "types-openpyxl", + "types-openpyxl" ] [tool.bumpver] diff --git a/examples/default/templates/500.html b/examples/default/templates/500.html index e0c8464..b5cc34e 100644 --- a/examples/default/templates/500.html +++ b/examples/default/templates/500.html @@ -1,4 +1,5 @@ {% extends "base.html" %} + {% block content %}

500

Uh oh! Something went wrong on our end.

diff --git a/examples/default/templates/base.html b/examples/default/templates/base.html index 462bd2d..3e188be 100644 --- a/examples/default/templates/base.html +++ b/examples/default/templates/base.html @@ -1,22 +1,27 @@ {% load static %} {% load django_htmx %} {% load tailwind_cli %} + + {% block title %} Default {% endblock title %} + + {% block css %} {% endblock css %} + {% tailwind_css %} + {% block javascript_head %} {% endblock javascript_head %} + + {% block body %}
+ {% block content %} {% endblock content %} +
+ {% block javascript_foot %} {% endblock javascript_foot %} + {% endblock body %} + diff --git a/examples/postgis/default/settings.py b/examples/postgis/default/settings.py index fccce89..a90ec88 100644 --- a/examples/postgis/default/settings.py +++ b/examples/postgis/default/settings.py @@ -56,7 +56,9 @@ # 1. Django Core Settings # https://docs.djangoproject.com/en/5.1/ref/settings/ -ALLOWED_HOSTS = env.list("ALLOWED_HOSTS", default=["*"] if DEBUG else ["localhost"], subcast=str) +ALLOWED_HOSTS = env.list( + "ALLOWED_HOSTS", default=["*"] if DEBUG else ["localhost"], subcast=str +) ASGI_APPLICATION = "default.asgi.application" @@ -446,7 +448,7 @@ ) # sentry -if PROD and(SENTRY_DSN := env.url("SENTRY_DSN", default=None)).scheme: +if PROD and (SENTRY_DSN := env.url("SENTRY_DSN", default=None)).scheme: sentry_sdk.init( dsn=SENTRY_DSN.geturl(), environment=env.str( diff --git a/examples/postgis/pyproject.toml b/examples/postgis/pyproject.toml index 8f8d912..e39ef1a 100644 --- a/examples/postgis/pyproject.toml +++ b/examples/postgis/pyproject.toml @@ -41,11 +41,11 @@ dependencies = [ "openpyxl", "psycopg[binary, pool]", "sentry-sdk[django]", - "whitenoise", + "whitenoise" ] +dynamic = ["version"] name = "default" requires-python = ">=3.12" -dynamic = ["version"] [project.optional-dependencies] docs = [ @@ -76,7 +76,7 @@ types = [ "django-stubs", "mypy", "types-croniter", - "types-openpyxl", + "types-openpyxl" ] [tool.bumpver] diff --git a/examples/postgis/templates/base.html b/examples/postgis/templates/base.html index 462bd2d..3e188be 100644 --- a/examples/postgis/templates/base.html +++ b/examples/postgis/templates/base.html @@ -1,22 +1,27 @@ {% load static %} {% load django_htmx %} {% load tailwind_cli %} + + {% block title %} Default {% endblock title %} + + {% block css %} {% endblock css %} + {% tailwind_css %} + {% block javascript_head %} {% endblock javascript_head %} + + {% block body %}
+ {% block content %} {% endblock content %} +
+ {% block javascript_foot %} {% endblock javascript_foot %} + {% endblock body %} + diff --git a/examples/with_vite/pyproject.toml b/examples/with_vite/pyproject.toml index 1f0dfca..6c2c6cc 100644 --- a/examples/with_vite/pyproject.toml +++ b/examples/with_vite/pyproject.toml @@ -42,11 +42,11 @@ dependencies = [ "openpyxl", "psycopg[binary, pool]", "sentry-sdk[django]", - "whitenoise", + "whitenoise" ] +dynamic = ["version"] name = "with_vite" requires-python = ">=3.12" -dynamic = ["version"] [project.optional-dependencies] docs = [ @@ -77,7 +77,7 @@ types = [ "django-stubs", "mypy", "types-croniter", - "types-openpyxl", + "types-openpyxl" ] [tool.bumpver] @@ -92,12 +92,12 @@ version_pattern = "YYYY.MM.INC1" ".copier/project.yml" = [ 'current_version: {version}' ] -"with_vite/__init__.py" = [ - '__version__ = "{version}"' -] "tests/test_version.py" = [ 'assert __version__ == "{version}"' ] +"with_vite/__init__.py" = [ + '__version__ = "{version}"' +] [tool.coverage.report] exclude_lines = [ diff --git a/examples/with_vite/templates/index.html b/examples/with_vite/templates/index.html index 3e78540..dd2784d 100644 --- a/examples/with_vite/templates/index.html +++ b/examples/with_vite/templates/index.html @@ -1,4 +1,5 @@ {% extends "base.html" %} + {% block content %}

Index

diff --git a/examples/with_vite/with_vite/settings.py b/examples/with_vite/with_vite/settings.py index ffb20db..467c7f9 100644 --- a/examples/with_vite/with_vite/settings.py +++ b/examples/with_vite/with_vite/settings.py @@ -56,7 +56,9 @@ # 1. Django Core Settings # https://docs.djangoproject.com/en/5.1/ref/settings/ -ALLOWED_HOSTS = env.list("ALLOWED_HOSTS", default=["*"] if DEBUG else ["localhost"], subcast=str) +ALLOWED_HOSTS = env.list( + "ALLOWED_HOSTS", default=["*"] if DEBUG else ["localhost"], subcast=str +) ASGI_APPLICATION = "with_vite.asgi.application" @@ -456,7 +458,7 @@ DJANGO_VITE_DEV_SERVER_PORT = 5173 # sentry -if PROD and(SENTRY_DSN := env.url("SENTRY_DSN", default=None)).scheme: +if PROD and (SENTRY_DSN := env.url("SENTRY_DSN", default=None)).scheme: sentry_sdk.init( dsn=SENTRY_DSN.geturl(), environment=env.str(