File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 12
12
from wagtail .images .blocks import ImageChooserBlock
13
13
14
14
15
- class ImageBlock (StructBlock ):
15
+ class CaptionedImageBlock (StructBlock ):
16
16
"""
17
17
Custom `StructBlock` for utilizing images with associated caption and
18
18
attribution data
@@ -36,7 +36,7 @@ def get_preview_value(self):
36
36
37
37
class Meta :
38
38
icon = "image"
39
- template = "blocks/image_block .html"
39
+ template = "blocks/captioned_image_block .html"
40
40
preview_value = {"attribution" : "The Wagtail Bakery" }
41
41
description = "An image with optional caption and attribution"
42
42
@@ -108,7 +108,7 @@ class BaseStreamBlock(StreamBlock):
108
108
),
109
109
description = "A rich text paragraph" ,
110
110
)
111
- image_block = ImageBlock ()
111
+ image_block = CaptionedImageBlock ()
112
112
block_quote = BlockQuote ()
113
113
embed_block = EmbedBlock (
114
114
help_text = "Insert an embed URL e.g https://www.youtube.com/watch?v=SGJFWirQ3ks" ,
Original file line number Diff line number Diff line change 13
13
from wagtail .embeds .blocks import EmbedBlock
14
14
from wagtail .images .blocks import ImageChooserBlock
15
15
16
- from bakerydemo .base .blocks import BlockQuote , HeadingBlock , ImageBlock
16
+ from bakerydemo .base .blocks import BlockQuote , CaptionedImageBlock , HeadingBlock
17
17
18
18
19
19
class RecipeStepBlock (StructBlock ):
@@ -104,7 +104,7 @@ class RecipeStreamBlock(StreamBlock):
104
104
},
105
105
)
106
106
107
- image_block = ImageBlock (group = "Media" )
107
+ image_block = CaptionedImageBlock (group = "Media" )
108
108
embed_block = EmbedBlock (
109
109
help_text = "Insert an embed URL e.g https://www.youtube.com/watch?v=SGJFWirQ3ks" ,
110
110
icon = "media" ,
File renamed without changes.
You can’t perform that action at this time.
0 commit comments