class HomePage(Page):
body = StreamField([
('heading', blocks.CharBlock(classname="full")),
('carousel', ListBlock(
StructBlock([
('image', ImageChooserBlock()),
('page', PageChooserBlock()),
('quotation', TextBlock()),
]), icon='cogs', template='shop/blocks/carousel.html')),
])
class ItemPage(Page):
intro = models.CharField(max_length=255)
body = RichTextField()
{% for item in self %}
<a href="{{ item.page.url }}">
{% image item.image width-400 %}
{{ item.quotation }}
{{ item.page.intro }}
{{ item.page.body }}
</a>
{% endfor %}