Skip to main content

wagtail-flexible-streamfield

PyPI version License Python versions

A Wagtail StreamField subclass that doesn't create new migrations when block configurations change.

Installation

pip install wagtail-flexible-streamfield

Add wagtail_flexible_streamfield to INSTALLED_APPS:

INSTALLED_APPS = [
    ...
    "wagtail_flexible_streamfield",
]

Usage

Replace from wagtail.fields import StreamField with the package's import:

from wagtail_flexible_streamfield.fields import StreamField

class MyPage(Page):
    content = StreamField([
        ("text", CharBlock()),
        ("rich_text", RichTextBlock()),
    ], blank=True)

A single migration is created when you first add the field. After that, adding, removing, or modifying blocks never requires a new migration — the field's deconstruct() output is always identical regardless of the block configuration.

How it works

Wagtail's default StreamField.deconstruct() records every block definition in the migration file. This package overrides deconstruct() to store an empty block_lookup instead, so Django's migration autodetector never sees a change when blocks are updated.

__init__() is also overridden to accept calls with no block arguments (the form Django uses when reconstructing the field from a migration), and to_python() is overridden to return a useful lazy StreamValue when block definitions are unavailable at migration time.

Metadata

Release files for wagtail-flexible-streamfield 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wagtail-flexible-streamfield 0.2.0
File Size Uploaded Provenance
wagtail_flexible_streamfield-0.2.0.tar.gz 3.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for wagtail-flexible-streamfield 0.2.0
File Interpreter ABI Platform
wagtail_flexible_streamfield-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.9 kB

Release files / wagtail_flexible_streamfield-0.2.0.tar.gz

Download URL wagtail_flexible_streamfield-0.2.0.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
afc049634fe38c2b2f4b7986af123558a015ad00303ee4e6f5552e9d9cd4db01
BLAKE2b-256 checksum
How to use checksums
9bf067aa8fd33868dbcc20d3ace738d0f9dd91e90c7d43b822d1d5d1cc3a649c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Release files / wagtail_flexible_streamfield-0.2.0-py3-none-any.whl

Download URL wagtail_flexible_streamfield-0.2.0-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a38db5c84d3c8e8a4e180820ef6ddd7367ceeff47f8556d306ac2411d9f36f73
BLAKE2b-256 checksum
How to use checksums
b27114a20393aad7b3eca4db5ad94c9604c85576f9895647f25644b0a435ff66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Security for wagtail-flexible-streamfield 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page