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).

The tree remembers open branches, search and filters per browser tab, and admin actions started from it (edit, add, copy, delete …) return to it with the page revealed. Every page's header menu gets a Show in Page Tree action, and the column header shows each locale's translation coverage.

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.3.1

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.3.1
File Size Uploaded Provenance Actions
wagtail_pagetree-0.3.1.tar.gz 78.6 kB Without provenance Details for wagtail_pagetree-0.3.1.tar.gz

Built distribution (wheel)

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

Total release size: 137.8 kB

Release files / wagtail_pagetree-0.3.1.tar.gz

Download URL wagtail_pagetree-0.3.1.tar.gz
Size 78.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d51fde21b6ff4fa110b744f2518c906bb83ac6843503d482dbc1576dae1ed533
BLAKE2b-256 checksum
How to use checksums
38093d20874ebbdb9ae0b2fc6837e6b5d7b1436bc56c0c2cc68c6fad52675c03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","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.3.1-py3-none-any.whl

Download URL wagtail_pagetree-0.3.1-py3-none-any.whl
Size 59.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
944d327fff529b206d3be36fb0b5458f7e066117e7bb78731e11f62ae1523d0b
BLAKE2b-256 checksum
How to use checksums
f9ddd27c608487669d20cb93a13b6887ef7134b37d937dbea889e66ebb8beab8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","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.3.1

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