Skip to main content

wagtail-pagetree

Lazy-loaded, virtualised page tree for the Wagtail admin.

Ships a single admin viewset (pagetree:index) that renders a fast, locale-aware explorer over wagtail.models.Page. The tree loads children on demand via JSON endpoints, supports drag-and-drop reordering with cascade translations, context menu and bulk actions, respects PagePermissionPolicy, and scales to large trees (P95 < 200 ms for 500-page corpora).

Page Tree in the Wagtail admin: German primary tree with per-locale status dots and the row menu open

Install

uv add wagtail-pagetree            # or: pip install wagtail-pagetree
uv add "wagtail-pagetree[localize]"  # with wagtail-localize integration

Add to INSTALLED_APPS:

INSTALLED_APPS = [
    # ...
    "wagtail",
    "wagtail_pagetree",
    # ...
]

The viewset auto-registers via wagtail_hooks.py. Restart your dev server and look for Page Tree in the admin sidebar.

wagtail-localize is optional. When installed, the tree flags out-of-date translations and links to its sync / translate views; without it those features are simply absent.

Requirements

  • Python 3.10 – 3.14
  • Django 4.2, 5.2, 6.0, 6.1
  • Wagtail 6.3, 7.0, 8.0

Translations

The admin UI ships English and German. Catalogs live in src/wagtail_pagetree/locale/<lang>/LC_MESSAGES/:

  • django.po — Python and template strings
  • djangojs.po — the React frontend, served by the viewset's own JavaScriptCatalog (pagetree:jsi18n)
scripts/makemessages.sh          # re-extract every existing locale
scripts/makemessages.sh fr       # add a new locale
scripts/makemessages.sh --compile

Development

uv sync                          # dev environment (pytest, tox, wagtail-localize)
uv run pytest                    # test suite against tests/settings.py (SQLite)
uv run pytest --cov              # with coverage
uv run pytest -m bench -s        # opt-in benchmarks
uv run tox run-parallel          # full Python × Django × Wagtail matrix

# rebuild the JS bundle after editing frontend/src/
cd frontend
npm install
npm run build
npm run check                    # drift gate: committed bundle must match source

Release

  1. Bump the version in pyproject.toml and src/wagtail_pagetree/__init__.py.
  2. Commit, then tag and push: git tag v0.1.0 && git push origin v0.1.0.

The Release workflow runs the test matrix, builds, publishes to TestPyPI, then PyPI (trusted publishing, no stored token) and creates a GitHub release. It refuses to publish when the tag and the two version strings disagree.

Layout

├── pyproject.toml
├── tox.ini
├── src/wagtail_pagetree/        # the Django app
│   ├── apps.py
│   ├── viewsets.py              # registers the admin viewset + JS catalog
│   ├── views.py                 # tree, children, bulk, move endpoints
│   ├── wagtail_hooks.py         # @hooks.register("register_admin_viewset")
│   ├── services/                # tree, presenters, permissions, locale, search, bulk, move, translations
│   ├── locale/                  # django.po / djangojs.po
│   ├── templates/wagtail_pagetree/page_tree.html
│   └── static/wagtail_pagetree/{css,js}/...
├── frontend/                    # React/JSX source for bundle.js (esbuild)
├── scripts/makemessages.sh
└── tests/                       # settings.py, urls.py, testapp/ + test modules

License

MIT.

Metadata

Release files for wagtail-pagetree 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-pagetree 0.2.0
File Size Uploaded Provenance Actions
wagtail_pagetree-0.2.0.tar.gz 74.1 kB Without provenance Details for wagtail_pagetree-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wagtail-pagetree 0.2.0
File Interpreter ABI Platform Actions
wagtail_pagetree-0.2.0-py3-none-any.whl Python 3 none any Details for wagtail_pagetree-0.2.0-py3-none-any.whl

Total release size: 129.3 kB

Release files / wagtail_pagetree-0.2.0.tar.gz

Download URL wagtail_pagetree-0.2.0.tar.gz
Size 74.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8181d9b04a39efd6acb0fad02e5db9b54635d77a4e9d989309a2c9b2dc439941
BLAKE2b-256 checksum
How to use checksums
c55ee7e6676828d92e0db88414d79942a2ad8e4c875ae61bc709da2f65c809f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

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

Download URL wagtail_pagetree-0.2.0-py3-none-any.whl
Size 55.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
01cdea9f4f2d3be2a10c31be7444c4679211d9c2953663f5a035cc182bd236e4
BLAKE2b-256 checksum
How to use checksums
7cefd7d9af3d29816d1ee9681554e3fa15b329a44933b0bd1564af09bf7e5080
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for wagtail-pagetree 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.

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