django-wagtail-blocks-exchange
Portable Django library: Copy to pages on each block in every Wagtail StreamField on the page editor. Select target page(s) and which StreamField(s) on each page receive the block (multi-select supported).
Author: Aymane Nahji
Zero configuration
After adding the app to INSTALLED_APPS, you do not need WAGTAIL_BLOCKS_EXCHANGE_BODY_FIELD.
- Copy actions appear on blocks in every StreamField the editor renders (
{field_name}-root). - Eligible targets are pages you can edit whose model includes that block type on at least one StreamField.
- In the modal you pick pages and stream fields; the block is prepended at the top of each chosen field (draft revision).
Optional: WAGTAIL_BLOCKS_EXCHANGE_STREAM_FIELDS to allowlist field names server-side. Legacy WAGTAIL_BLOCKS_EXCHANGE_BODY_FIELD is treated as a one-item allowlist.
Install
pip install django-wagtail-blocks-exchange
# or from a checkout:
pip install /path/to/django-wagtail-blocks-exchange
INSTALLED_APPS = [
# ...
"wagtail",
"wagtail_blocks_exchange",
]
Run collectstatic in production so admin CSS/JS are served.
Admin API
Under the Wagtail admin prefix at blocks-exchange/:
| Endpoint | Method | Body |
|---|---|---|
eligible-pages/ |
POST JSON | source_page_id, block_type, optional source_stream_field_name |
copy-block/ |
POST form or JSON | target_page_ids, target_stream_field_names, block payload |
Responses include per-page stream_fields when listing eligible pages.
Develop & test
pip install -e ".[dev]"
PYTHONPATH=. DJANGO_SETTINGS_MODULE=tests_project.settings python -m django test wagtail_blocks_exchange
Uses tests_project/ (BlocksExchangeTestPage). See wagtail_blocks_exchange/README.md for workflow, security, and i18n.
Related
- django-wagtail-ai-generation — AI-assisted stream content on the same editor.
- django-wagtail-icon-chooser — Lucide fields copied as string values.
License
MIT — see LICENSE.
Metadata
Release files for django-wagtail-blocks-exchange 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_wagtail_blocks_exchange-0.1.0.tar.gz | 74.3 kB | Without provenance | Details for django_wagtail_blocks_exchange-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_wagtail_blocks_exchange-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for django_wagtail_blocks_exchange-0.1.0-py3-none-any.whl |
Total release size: 104.3 kB
Release files / django_wagtail_blocks_exchange-0.1.0.tar.gz
| Download URL | django_wagtail_blocks_exchange-0.1.0.tar.gz |
|---|---|
| Size | 74.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d294653f473664184f0448186c675961138b80c4536178d93f18cfc799cac465
|
|
BLAKE2b-256 checksum How to use checksums |
6c49f8cd632ef2ad661169ab0d76f174f84313cbf5a00107b89949efd68c5b73
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / django_wagtail_blocks_exchange-0.1.0-py3-none-any.whl
| Download URL | django_wagtail_blocks_exchange-0.1.0-py3-none-any.whl |
|---|---|
| Size | 30.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ffc6b523c164265f5d8ca5062ed2a519ba75a434cd3f9a0be4a19201b1aae89b
|
|
BLAKE2b-256 checksum How to use checksums |
e59095d7be32d63375b3eb74f45951a54d90d0117c8bb2ec6dad0ccddb7b977d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for django-wagtail-blocks-exchange 0.1.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.