Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. {% for block in values %}
  2. {% if block.block_type == 'features' %}
  3. {{ block.value.feature.title }}
  4.  
  5. class Features_1_Block(blocks.StructBlock):
  6. title = blocks.CharBlock()
  7. description = blocks.TextBlock(required=False)
  8. features = blocks.StreamBlock([
  9. ('feature', blocks.StructBlock([
  10. ('icon', blocks.CharBlock()),
  11. ('title', blocks.CharBlock()),
  12. ('description', blocks.TextBlock())
  13. ]))
  14. ])
  15.  
  16. class Meta:
  17. template = 'streamfield_blocks/features_1.html'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement