Skip to content

Commit

Permalink
Add custom template to heading block
Browse files Browse the repository at this point in the history
  • Loading branch information
tysen committed Sep 9, 2021
1 parent 4faac13 commit 78df843
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion puput/abstracts.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class Meta:

class EntryAbstract(models.Model):
body = StreamField([
('heading', blocks.CharBlock(form_classname="full title")),
('heading', blocks.CharBlock(form_classname='full title', template='puput/blocks/heading.html')),
('paragraph', blocks.RichTextBlock()),
('image', blocks.StructBlock(
[
Expand Down
21 changes: 21 additions & 0 deletions puput/migrations/0008_alter_entrypage_body.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated by Django 3.2.6 on 2021-09-09 23:00

from django.db import migrations
import wagtail.core.blocks
import wagtail.core.fields
import wagtail.images.blocks


class Migration(migrations.Migration):

dependencies = [
('puput', '0007_alter_entrypage_body'),
]

operations = [
migrations.AlterField(
model_name='entrypage',
name='body',
field=wagtail.core.fields.StreamField([('heading', wagtail.core.blocks.CharBlock(form_classname='full title', template='puput/blocks/heading.html')), ('paragraph', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock()), ('caption', wagtail.core.blocks.CharBlock(required=False))], template='puput/blocks/captioned_image.html')), ('embed', wagtail.core.blocks.URLBlock(template='home/partials/embed.html'))]),
),
]

0 comments on commit 78df843

Please sign in to comment.