Skip to content

Commit d852404

Browse files
committed
2 parents 751f884 + 4f16323 commit d852404

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ For example, if you have in page template `request` and `page` objects and want
369369
```
370370

371371
### Get field data as list
372-
If you have special cases, you can get data as list. \
372+
If you have special case, you can get data as list.
373373

374374
```python
375375
# views.py
@@ -380,19 +380,21 @@ stream_list = page.stream.as_list()
380380
'data': {
381381
'block_model': '.....',
382382
'block_unique_id': '....',
383-
'block_content': [],
383+
'block_content': [...],
384384
'as_list': True,
385385
'options': {}
386386
},
387387
'template': '....'
388388
},
389-
#...
389+
...
390390
]
391391
```
392392

393393
```html
394394
<!-- template.html -->
395-
{{ page.stream.as_list }}
395+
{% for b in page.stream.as_list %}
396+
{% include b.template with block_content=b.data.block_content %}
397+
{% endfor %}
396398
```
397399

398400

0 commit comments

Comments
 (0)