Skip to content

Commit

Permalink
Add wagtailcodeblock
Browse files Browse the repository at this point in the history
  • Loading branch information
trickeydan committed Dec 29, 2023
1 parent afcff3b commit e2fc7c8
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kmicms/core/blocks/base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from wagtail import blocks
from wagtailcodeblock.blocks import CodeBlock

from .components import MastheadBlock, ShowcaseBlock
from .elements import AlertBlock, CardGridBlock, HeadingBlock
Expand All @@ -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):
Expand Down
1 change: 1 addition & 0 deletions kmicms/kmicms/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
"django_recaptcha",
"crispy_forms",
"crispy_bootstrap5",
"wagtailcodeblock",
# Wagtail / Django
"wagtail.contrib.forms",
"wagtail.contrib.redirects",
Expand Down
4 changes: 4 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e2fc7c8

Please sign in to comment.