From a6beb1e4a62e046ecce4e9e9883eb0329db0482a Mon Sep 17 00:00:00 2001 From: Stuart Maxwell Date: Sun, 19 Jul 2026 19:30:29 +1200 Subject: [PATCH 1/4] Update justfile --- justfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/justfile b/justfile index 218c800..e2438df 100644 --- a/justfile +++ b/justfile @@ -79,7 +79,7 @@ startapp APPNAME: pdm run manage.py startapp {{APPNAME}} # Generic manage command -@manage ARGS="": +manage *ARGS: pdm run manage.py {{ARGS}} # Build the CSS from SCSS From bab0e038a98748f6138afc675b368a52c7b10f59 Mon Sep 17 00:00:00 2001 From: Stuart Maxwell Date: Sun, 19 Jul 2026 19:30:48 +1200 Subject: [PATCH 2/4] Add djpress-tiptap --- pdm.lock | 66 +++++++++++++++++++++++++++++++++++++++++++++++--- pyproject.toml | 1 + 2 files changed, 63 insertions(+), 4 deletions(-) diff --git a/pdm.lock b/pdm.lock index 5f3f071..d3c87f6 100644 --- a/pdm.lock +++ b/pdm.lock @@ -5,7 +5,7 @@ groups = ["default"] strategy = ["inherit_metadata"] lock_version = "4.5.0" -content_hash = "sha256:e56d852b23327d30d0bfbe19c1394211bfc5b4e20c36fb525d83be847eef1eab" +content_hash = "sha256:94a93add0fb7fcae02d905545611d5b834a1964b067d282be76f593116c1e803" [[metadata.targets]] requires_python = "==3.14.*" @@ -260,7 +260,7 @@ files = [ [[package]] name = "djpress" -version = "0.29.9" +version = "0.30.0" requires_python = ">=3.10" summary = "A blog application for Django sites, inspired by classic WordPress." groups = ["default"] @@ -269,8 +269,8 @@ dependencies = [ "markdown>=3.7", ] files = [ - {file = "djpress-0.29.9-py3-none-any.whl", hash = "sha256:7420a3541541c2954b784d9adcebdd995d42469a631a69da6800cd3a79bc619a"}, - {file = "djpress-0.29.9.tar.gz", hash = "sha256:f9ca8b440b82b419ec9393fa50f5eac23525eb8f07dd48b8a6c9f22895032322"}, + {file = "djpress-0.30.0-py3-none-any.whl", hash = "sha256:1ff55f9c4d3334097233fca77e17fd75a2cb5a7b7a495b9da203b01652a13ec7"}, + {file = "djpress-0.30.0.tar.gz", hash = "sha256:d1d21c97fa6cf98597103c6a6d861a005311a933c9caf750a8d1bb40ecfd5401"}, ] [[package]] @@ -317,6 +317,22 @@ files = [ {file = "djpress_publish_mastodon-1.4.0.tar.gz", hash = "sha256:b3cfb532bfe20eea947f3c4c77ddde0b3e4dcbb4a28c7af53441eb703ddc0e4e"}, ] +[[package]] +name = "djpress-tiptap" +version = "0.2.3" +requires_python = ">=3.14" +summary = "Rich text editor for DJ Press based on Tiptap." +groups = ["default"] +dependencies = [ + "djpress>=0.30.0", + "pillow~=12.3", + "puremagic~=2.2", +] +files = [ + {file = "djpress_tiptap-0.2.3-py3-none-any.whl", hash = "sha256:ae36608e42ea30aa004dadb5e82b039b3246bcf621f48392998d8662258516f3"}, + {file = "djpress_tiptap-0.2.3.tar.gz", hash = "sha256:56dddbd6d2f55d7e01d686ef317affe603eeb68264906e8b0addf5a94bbf6a98"}, +] + [[package]] name = "environs" version = "15.0.1" @@ -794,6 +810,37 @@ files = [ {file = "packaging-26.2.tar.gz", hash = "sha256:ff452ff5a3e828ce110190feff1178bb1f2ea2281fa2075aadb987c2fb221661"}, ] +[[package]] +name = "pillow" +version = "12.3.0" +requires_python = ">=3.10" +summary = "Python Imaging Library (fork)" +groups = ["default"] +files = [ + {file = "pillow-12.3.0-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:9cf95fe4d0f84c82d282745d9bb08ad9f926efa00be4697e767b814ce40d4330"}, + {file = "pillow-12.3.0-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:8728f216dcdb6e6d555cf971cb34076139ad74b31fc2c14da4fafc741c5f6217"}, + {file = "pillow-12.3.0-cp314-cp314-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:a45650e8ce7fafffd731db8550230db6b0d306d181a90b67d3e6bca2f1990930"}, + {file = "pillow-12.3.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:ba54cfebe86920a559a7c4d6b9050791c20513650a1952ebe3368c7dc70306f8"}, + {file = "pillow-12.3.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:e158cb00350dc278f3b91551101aa7d12415a66ebf2c91d8d5ac14e56ddd3ad0"}, + {file = "pillow-12.3.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e9aeb04d6aef139de265b29683e119b638208f88cf73cdd1658aa07221165321"}, + {file = "pillow-12.3.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:251bf95b67017e27b13d82f5b326234ca62d70f9cf4c2b9032de2358a3b12c7b"}, + {file = "pillow-12.3.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:fe3cca2e4e8a592be0f269a1ca4835c25199d9f3ce815c8491048f785b0a0198"}, + {file = "pillow-12.3.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:23aceaa007d6172b02c277f0cd359c79492bbb14f7072b4ede9fbcaf20648130"}, + {file = "pillow-12.3.0-cp314-cp314-win32.whl", hash = "sha256:af8d94b0db561cf68b88a267c5c44b49e134f525d0dc2cb7ed413a66bc23559a"}, + {file = "pillow-12.3.0-cp314-cp314-win_amd64.whl", hash = "sha256:fdafc9cce40277e0f7a0feabce0ee50dd2fa1800f3b38015e51296b5e814048d"}, + {file = "pillow-12.3.0-cp314-cp314-win_arm64.whl", hash = "sha256:e91206ee562682b51b98ef4b26a6ef48fd84e15fd4c4bc5ec768eb641d206838"}, + {file = "pillow-12.3.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:164b31cd1a0490ab6efae01aa5df49da7061be0af1b30e035b6e9a1bfe34ee6e"}, + {file = "pillow-12.3.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:5afb51d599ea772b8365ae807ae557f18bccfe46ab261fd1c2a9ed700fc6eb17"}, + {file = "pillow-12.3.0-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3edce1d53195db527e0191f84b71d02022de0540bf43a16ed734ed7537b07385"}, + {file = "pillow-12.3.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bf16ba1b4d0b6b7c8e534936632270cf70eb00dbe09005bc345b2677b726855c"}, + {file = "pillow-12.3.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:24870b09b224f7ae3c39ed07d10e819d06f8720bc551847b1d623832b5b0e28d"}, + {file = "pillow-12.3.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:30f2aa603c41533cc25c05acd0da21636e84a315768feb631c937177db558931"}, + {file = "pillow-12.3.0-cp314-cp314t-win32.whl", hash = "sha256:4b0a7fe987b14c31ebda6083f74f22b561fd3739bc0ac51e019622e3d72668c7"}, + {file = "pillow-12.3.0-cp314-cp314t-win_amd64.whl", hash = "sha256:962864dc93511324d51ddbb5b9f8731bf71675b93ca612a07441896f4688fb8c"}, + {file = "pillow-12.3.0-cp314-cp314t-win_arm64.whl", hash = "sha256:0740a512dc522224c77d9aa5a8d70d8b7d73fb91f2c21125d8d025d3b8990e45"}, + {file = "pillow-12.3.0.tar.gz", hash = "sha256:3b8182a766685eaa002637e28b4ec8d6b18819a0c71f579bf0dbaa5830297cce"}, +] + [[package]] name = "pluggy" version = "1.6.0" @@ -822,6 +869,17 @@ files = [ {file = "protobuf-6.33.6.tar.gz", hash = "sha256:a6768d25248312c297558af96a9f9c929e8c4cee0659cb07e780731095f38135"}, ] +[[package]] +name = "puremagic" +version = "2.2.0" +requires_python = ">=3.12" +summary = "Pure python implementation of magic file detection" +groups = ["default"] +files = [ + {file = "puremagic-2.2.0-py3-none-any.whl", hash = "sha256:c4f7ed7307f056c787199acfda839555921be1df13abba61e8e6db0c787ae1d0"}, + {file = "puremagic-2.2.0.tar.gz", hash = "sha256:eb4bddf07c177c4b434554b92165b67449f5a51e152b976202d6254498810eef"}, +] + [[package]] name = "pygments" version = "2.20.0" diff --git a/pyproject.toml b/pyproject.toml index 677e439..96da420 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,6 +24,7 @@ dependencies = [ "django-storages[s3]~=1.14", "uvicorn[standard]~=0.49", "djpress-blog-theme~=0.4", + "djpress-tiptap~=0.2", ] authors = [ {name = "Stuart Maxwell", email = "stuart@amanzi.nz"}, From 8a96e050580b22659d376070401a95458fabc405 Mon Sep 17 00:00:00 2001 From: Stuart Maxwell Date: Sun, 19 Jul 2026 19:31:28 +1200 Subject: [PATCH 3/4] Configure djpress-tiptap --- config/settings.py | 3 ++- config/urls.py | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/config/settings.py b/config/settings.py index 601a623..d523675 100644 --- a/config/settings.py +++ b/config/settings.py @@ -82,6 +82,7 @@ "home", "debugging_app", "djpress_blog_theme", + "djpress_tiptap", ] if DEBUG: @@ -269,7 +270,7 @@ "THEME": "djpress_blog_theme", "DATABASE_SETTINGS_ENABLED": True, "AUTHOR_ENABLED": True, - "MARKDOWN_RENDERER": "config.markdown_renderer.mistune_renderer", + "CONTENT_RENDERER": "djpress_tiptap.renderers.html_renderer", "PLUGINS": [ "djpress_publish_mastodon", "djpress_publish_bluesky", diff --git a/config/urls.py b/config/urls.py index 34a090f..1e891fb 100644 --- a/config/urls.py +++ b/config/urls.py @@ -6,15 +6,28 @@ from django.contrib.sitemaps.views import sitemap from django.urls import include, path from django.views.generic import TemplateView +from djpress.admin import PostAdmin +from djpress.models import Post from djpress.sitemaps import ( CategorySitemap, DateBasedSitemap, PageSitemap, PostSitemap, ) +from djpress_tiptap.widgets import DjTiptapWidget from config.sitemaps import StaticSitemap +"""Custom admin configuration.""" +admin.site.unregister(Post) + +@admin.register(Post) +class TiptapPostAdmin(PostAdmin): + """Over-ride the DJ Press PostAdmin.""" + def get_form(self, request, obj=None, change=False, **kwargs): # noqa: ANN001, ANN003, ANN201, D102, FBT002 + kwargs["widgets"] = {"content": DjTiptapWidget()} + return super().get_form(request, obj, change, **kwargs) + sitemaps = { "posts": PostSitemap, "pages": PageSitemap, @@ -42,6 +55,7 @@ path("utils/__debugging__/", view=include("debugging_app.urls")), path("robots.txt", TemplateView.as_view(template_name="robots.txt", content_type="text/plain")), path("sitemap.xml", sitemap, {"sitemaps": sitemaps}, name="django.contrib.sitemaps.views.sitemap"), + path("media/", include("djpress_tiptap.urls")), path("", include("djpress.urls")), *static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT), ] From 2f9fb149a85ec253155a4cced30f128846e8be4b Mon Sep 17 00:00:00 2001 From: Stuart Maxwell Date: Sun, 19 Jul 2026 19:32:16 +1200 Subject: [PATCH 4/4] Update dependencies --- pdm.lock | 45 ++++++++++++++++++++++----------------------- pyproject.toml | 14 +++++++------- 2 files changed, 29 insertions(+), 30 deletions(-) diff --git a/pdm.lock b/pdm.lock index d3c87f6..f7e3d99 100644 --- a/pdm.lock +++ b/pdm.lock @@ -5,7 +5,7 @@ groups = ["default"] strategy = ["inherit_metadata"] lock_version = "4.5.0" -content_hash = "sha256:94a93add0fb7fcae02d905545611d5b834a1964b067d282be76f593116c1e803" +content_hash = "sha256:91875ff0e9c61e2f8dd8f8d8dc32caaa433bd7c46fa9b5175527e564e0b971fe" [[metadata.targets]] requires_python = "==3.14.*" @@ -189,7 +189,7 @@ files = [ [[package]] name = "django" -version = "6.0.6" +version = "6.0.7" requires_python = ">=3.12" summary = "A high-level Python web framework that encourages rapid development and clean, pragmatic design." groups = ["default"] @@ -199,8 +199,8 @@ dependencies = [ "tzdata; sys_platform == \"win32\"", ] files = [ - {file = "django-6.0.6-py3-none-any.whl", hash = "sha256:25148b1194c47c2e685e5f5e9c5d59c78b075dfd282cb9618861ba6c1708f4d2"}, - {file = "django-6.0.6.tar.gz", hash = "sha256:ad03916ba59523d781ae5c3f631960c23d69a9d9c43cecda52fc23b47e953713"}, + {file = "django-6.0.7-py3-none-any.whl", hash = "sha256:a037427c2288443a8c02a1b02295a31c239663aa682bc50b1976afb7cf6a769e"}, + {file = "django-6.0.7.tar.gz", hash = "sha256:2998503fc083124fb58037084bfa00de323c7c743f05f1b4284e77bff0ab8890"}, ] [[package]] @@ -215,17 +215,17 @@ files = [ [[package]] name = "django-debug-toolbar" -version = "6.3.0" +version = "7.0.0" requires_python = ">=3.10" summary = "A configurable set of panels that display various debug information about the current request/response." groups = ["default"] dependencies = [ - "django>=4.2.9", + "django>=5.2", "sqlparse>=0.2", ] files = [ - {file = "django_debug_toolbar-6.3.0-py3-none-any.whl", hash = "sha256:a199ce3d0f884739a9096835ad417479fede05f3b3c4824bc8b354721ba8f629"}, - {file = "django_debug_toolbar-6.3.0.tar.gz", hash = "sha256:f830a86fe02e17f625a22cfbed24a5bd1500762e201ec959c50efb0f9327282b"}, + {file = "django_debug_toolbar-7.0.0-py3-none-any.whl", hash = "sha256:656161388ce48384276342eeb16d532113ec670816fa1546cc3753730aa51b3d"}, + {file = "django_debug_toolbar-7.0.0.tar.gz", hash = "sha256:ef7494c5b459c149e87cc2da88d86e944064945e86bd7b2d879093586b5fefbf"}, ] [[package]] @@ -613,7 +613,7 @@ files = [ [[package]] name = "mistune" -version = "3.3.2" +version = "3.3.3" requires_python = ">=3.8" summary = "A sane and fast Markdown parser with useful plugins and renderers" groups = ["default"] @@ -621,8 +621,8 @@ dependencies = [ "typing-extensions; python_version < \"3.11\"", ] files = [ - {file = "mistune-3.3.2-py3-none-any.whl", hash = "sha256:a678a56387d487db7368ede4647cb2ba1deff22ce61f92343e4ebe0ddfce4f2d"}, - {file = "mistune-3.3.2.tar.gz", hash = "sha256:e12ee4f1e74336e91aa1141e35f913b337c40bdf7c0cc49f21fb853a27e8b62f"}, + {file = "mistune-3.3.3-py3-none-any.whl", hash = "sha256:99de1585e42dcbd826faa9e11a202727a5e202e4e4722a4c69ac1ff615793dd7"}, + {file = "mistune-3.3.3.tar.gz", hash = "sha256:c4c6c0c840b8637a2e9b8b6d607eb7c8f00888bf14c754409bcd339e848c2477"}, ] [[package]] @@ -1026,7 +1026,7 @@ files = [ [[package]] name = "sentry-sdk" -version = "2.63.0" +version = "2.66.0" requires_python = ">=3.6" summary = "Python client for Sentry (https://sentry.io)" groups = ["default"] @@ -1035,8 +1035,8 @@ dependencies = [ "urllib3>=1.26.11", ] files = [ - {file = "sentry_sdk-2.63.0-py3-none-any.whl", hash = "sha256:3a9b5ddd403f79eb73bd670f75f04485819db53d28f76ced7bc09041cb0dfd6a"}, - {file = "sentry_sdk-2.63.0.tar.gz", hash = "sha256:2a1502bf864769275dbc8c2c9fc7a0f7f5e18358180b615d262d13a31ffba216"}, + {file = "sentry_sdk-2.66.0-py3-none-any.whl", hash = "sha256:096136c214c602be2b323524d30755dc5b30ec5a218a206207f33b12c05c6f11"}, + {file = "sentry_sdk-2.66.0.tar.gz", hash = "sha256:9727d35aa83c56cd53294676fe65b96296a334c9ce107fa2142bd70f47acb265"}, ] [[package]] @@ -1097,7 +1097,7 @@ files = [ [[package]] name = "uvicorn" -version = "0.49.0" +version = "0.51.0" requires_python = ">=3.10" summary = "The lightning-fast ASGI server." groups = ["default"] @@ -1107,30 +1107,29 @@ dependencies = [ "typing-extensions>=4.0; python_version < \"3.11\"", ] files = [ - {file = "uvicorn-0.49.0-py3-none-any.whl", hash = "sha256:ba3d14c3ee7e41c6c654c46c9eb489d33213cdd30aa1696eab1374337c13f68f"}, - {file = "uvicorn-0.49.0.tar.gz", hash = "sha256:ebf4271aa580d9de97f93192d4595176df6e91f9aae919ca73e4fc07df1e66a3"}, + {file = "uvicorn-0.51.0-py3-none-any.whl", hash = "sha256:5d38af6cd620f2ae3849fb44fd4879e0890aa1febe8d47eb355fb45d93fe6a5b"}, + {file = "uvicorn-0.51.0.tar.gz", hash = "sha256:f6f4b69b657c312f516dd2d268ab9ae6f254b11e4bac504f37b2ab58b24dd0b0"}, ] [[package]] name = "uvicorn" -version = "0.49.0" +version = "0.51.0" extras = ["standard"] requires_python = ">=3.10" summary = "The lightning-fast ASGI server." groups = ["default"] dependencies = [ - "colorama>=0.4; sys_platform == \"win32\"", "httptools>=0.8.0", "python-dotenv>=0.13", "pyyaml>=5.1", - "uvicorn==0.49.0", + "uvicorn==0.51.0", "uvloop>=0.15.1; (sys_platform != \"cygwin\" and sys_platform != \"win32\") and platform_python_implementation != \"PyPy\"", "watchfiles>=0.20", - "websockets>=10.4", + "websockets>=13.0", ] files = [ - {file = "uvicorn-0.49.0-py3-none-any.whl", hash = "sha256:ba3d14c3ee7e41c6c654c46c9eb489d33213cdd30aa1696eab1374337c13f68f"}, - {file = "uvicorn-0.49.0.tar.gz", hash = "sha256:ebf4271aa580d9de97f93192d4595176df6e91f9aae919ca73e4fc07df1e66a3"}, + {file = "uvicorn-0.51.0-py3-none-any.whl", hash = "sha256:5d38af6cd620f2ae3849fb44fd4879e0890aa1febe8d47eb355fb45d93fe6a5b"}, + {file = "uvicorn-0.51.0.tar.gz", hash = "sha256:f6f4b69b657c312f516dd2d268ab9ae6f254b11e4bac504f37b2ab58b24dd0b0"}, ] [[package]] diff --git a/pyproject.toml b/pyproject.toml index 96da420..c84dadd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,23 +6,23 @@ readme = "README.md" requires-python = "==3.14.*" dependencies = [ "django~=6.0", - "djpress~=0.29", + "djpress~=0.30", "whitenoise~=6.12", "gunicorn~=26.0", "environs[django]~=15.0", "rich~=15.0", - "sentry-sdk~=2.62", - "django-debug-toolbar~=6.3", + "sentry-sdk~=2.66", + "django-debug-toolbar~=7.0", "pytest~=9.1", "pytest-django~=4.12", - "mistune~=3.2", + "mistune~=3.3", "pygments~=2.20", - "djpress-publish-mastodon~=1.3", + "djpress-publish-mastodon~=1.4", "httpx~=0.28", "logfire[asgi,django]~=4.37", - "djpress-publish-bluesky~=1.1", + "djpress-publish-bluesky~=1.2", "django-storages[s3]~=1.14", - "uvicorn[standard]~=0.49", + "uvicorn[standard]~=0.51", "djpress-blog-theme~=0.4", "djpress-tiptap~=0.2", ]