Skip to main content

Wagtail SB Struct Block

Tabbed interface for Wagtail's struct blocks with settings fields.

Community-Project

PyPI - Supported versions PyPI - Package version PyPI - Downloads PyPI - License Codacy Grade Badge Codacy Coverage Badge Gitlab Pipeline Status

Package to render Wagtail StructBlock with a tabbed interface to distinguish between content fields and settings fields, improving the editor experience.

✨ Features

  • Tabbed Interface: Cleanly separate content fields from settings fields.
  • Easy Configuration: Simple to use by subclassing and defining settings_fields in Meta.
  • Modern Stack: Built for modern Python (3.11+) and up to date Django/Wagtail versions.

📋 Requirements

  • Python 3.11 or higher
  • Wagtail 5.2 or higher
  • Django 4.2 or higher

📦 Installation

Using pip

pip install wagtail-sb-structblock

Using uv

uv add wagtail-sb-structblock

🚀 Usage

Add wagtail_sb_structblock to your INSTALLED_APPS settings:

INSTALLED_APPS = [
    # ...
    "wagtail_sb_structblock",
    # ...
]

In your struct blocks must inherit from wagtail_sb_structblock.blocks.StructBlock and you must specify the settings_fields in your Meta class.

from wagtail.blocks import CharBlock
from wagtail_sb_structblock.blocks import StructBlock


class EnhancedHTMLBlock(StructBlock):
    text = CharBlock()
    html_attrs = CharBlock()

    class Meta:
        settings_fields = [
            "html_attrs",
        ]

Include it in your stream field and your model so you can use a tabbed interface for your struct block.

content tab

settings tab

🛠️ Development

Check out our Contribution Guide for details on setting up your development environment, running tests, and submitting pull requests.

The project uses uv for dependency management, ruff for linting, and tox for multi-environment testing.

📜 Changelog

See the CHANGELOG.md for a history of changes.

👥 Contributors

See our list of contributors.

📄 License

This project is licensed under the Apache License 2.0. See the LICENSE file for details.

Metadata

Release files for wagtail-sb-structblock 0.6.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-sb-structblock 0.6.0
File Size Uploaded Provenance
wagtail_sb_structblock-0.6.0.tar.gz 16.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for wagtail-sb-structblock 0.6.0
File Interpreter ABI Platform
wagtail_sb_structblock-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 32.9 kB

Release files / wagtail_sb_structblock-0.6.0.tar.gz

Download URL wagtail_sb_structblock-0.6.0.tar.gz
Size 16.9 kB
Tags Source
SHA-256 checksum
How to use checksums
71a8f0f9d362cf4e5df71efe737218a7606b3c070f48c954577b82386b07d20d
BLAKE2b-256 checksum
How to use checksums
852bcfb410fdf10e93cd5a9e4684dced1e3eca3558384df107e01081f2f7c7f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / wagtail_sb_structblock-0.6.0-py3-none-any.whl

Download URL wagtail_sb_structblock-0.6.0-py3-none-any.whl
Size 15.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
699052f04cb8f443d656080597b3547886f0a70240bacd51145df8647f244cef
BLAKE2b-256 checksum
How to use checksums
2efd27888247b94f202c4778f11afc650148a41b787545f42cc6c51c57bdbf5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for wagtail-sb-structblock 0.6.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.

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