wagtail-streamfield-utils
API
iterators
flatten_streamfield(streamvalue)
Returns a generator, yielding (block, path) tuple to each block in a streamfield.
from streamfieldutils.iterators import flatten_streamfield
page = MyPage.objects.first()
# Print a slash-separated path to each block followed by the block's value.
for block, path in flatten_streamfield(page.body):
print("/".join(path), block.value)
Contributing
Getting started
- Clone the repo
git clone https://github.com/mikemonteith/wagtail-streamfield-utils.git - Install dependencies
pip install -e .[testing]
Formatting
black .
Linting
flake8 .
Tests
pytest
Release files for wagtail-streamfield-migrate 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| wagtail-streamfield-migrate-0.0.1.tar.gz | 5.5 kB | Details |
Release files / wagtail-streamfield-migrate-0.0.1.tar.gz
| Download URL | wagtail-streamfield-migrate-0.0.1.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d3ad8135bf4ae91b1aeead077fe72f04ede9b2ac9686eb40a0fec3d47534c6d3
|
|
BLAKE2b-256 checksum How to use checksums |
6d472e0fb8a4d422f61147412b71ef70063447c3af2143714b5b44e99a857b29
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.5
|