chore: updates to the content API (for use in CIBUS)
This commit is contained in:
parent
1b3a2dec72
commit
917695a1da
3 changed files with 11 additions and 1 deletions
|
@ -1,3 +1,4 @@
|
|||
from wagtail.api import APIField
|
||||
from wagtail.blocks import (
|
||||
CharBlock,
|
||||
ChoiceBlock,
|
||||
|
@ -14,6 +15,13 @@ class ImageBlock(StructBlock):
|
|||
caption = CharBlock(required=False)
|
||||
attribution = CharBlock(required=False)
|
||||
|
||||
api_fields = [
|
||||
APIField('image'),
|
||||
# Adds a URL to a rendered thumbnail of the image to the API
|
||||
APIField('caption'),
|
||||
APIField('attribution'),
|
||||
]
|
||||
|
||||
class Meta:
|
||||
icon = "image"
|
||||
template = "base/blocks/image_block.html"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue