From e2fc7c8edfc0243ff01f8c1ad9f0bb4284b4d22c Mon Sep 17 00:00:00 2001 From: Dan Trickey Date: Fri, 29 Dec 2023 15:40:28 +0000 Subject: [PATCH] Add wagtailcodeblock --- kmicms/core/blocks/base.py | 2 ++ kmicms/kmicms/settings.py | 1 + requirements-dev.txt | 4 ++++ requirements.in | 5 +++++ requirements.txt | 4 ++++ 5 files changed, 16 insertions(+) diff --git a/kmicms/core/blocks/base.py b/kmicms/core/blocks/base.py index 2d9f3cd..620db9a 100644 --- a/kmicms/core/blocks/base.py +++ b/kmicms/core/blocks/base.py @@ -1,4 +1,5 @@ from wagtail import blocks +from wagtailcodeblock.blocks import CodeBlock from .components import MastheadBlock, ShowcaseBlock from .elements import AlertBlock, CardGridBlock, HeadingBlock @@ -9,6 +10,7 @@ class StoryBlock(blocks.StreamBlock): rich_text = blocks.RichTextBlock(editor="all-but-headings") alert = AlertBlock() card_grid = CardGridBlock() + code = CodeBlock() class ContainerBlock(blocks.StructBlock): diff --git a/kmicms/kmicms/settings.py b/kmicms/kmicms/settings.py index 91debbe..ba19900 100644 --- a/kmicms/kmicms/settings.py +++ b/kmicms/kmicms/settings.py @@ -99,6 +99,7 @@ "django_recaptcha", "crispy_forms", "crispy_bootstrap5", + "wagtailcodeblock", # Wagtail / Django "wagtail.contrib.forms", "wagtail.contrib.redirects", diff --git a/requirements-dev.txt b/requirements-dev.txt index 1fc0c72..363c916 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -253,6 +253,10 @@ urllib3==2.0.7 # requests # responses wagtail==5.2.2 + # via + # -r requirements.txt + # wagtailcodeblock +wagtailcodeblock==1.29.0.1 # via -r requirements.txt webencodings==0.5.1 # via diff --git a/requirements.in b/requirements.in index 0cee1cb..653be9e 100644 --- a/requirements.in +++ b/requirements.in @@ -1,11 +1,16 @@ wagtail>=5.2,<5.3 # LTS django>=4.2,<4.3 # LTS +# Django Apps django_compressor django-crispy-forms django-libsass crispy-bootstrap5 +# Wagtail Apps +wagtailcodeblock + +# Other Dependencies authlib>=1.2.1,<2 django-recaptcha>=4,<5 pydantic>=2.4,<3 diff --git a/requirements.txt b/requirements.txt index a8a6717..d8181ce 100644 --- a/requirements.txt +++ b/requirements.txt @@ -138,6 +138,10 @@ typing-extensions==4.8.0 urllib3==2.0.7 # via requests wagtail==5.2.2 + # via + # -r requirements.in + # wagtailcodeblock +wagtailcodeblock==1.29.0.1 # via -r requirements.in webencodings==0.5.1 # via html5lib