A Sharepoint document integration for Wagtail
Links
Overview
wagtail-sharepoint provides a StreamField block choosers for SharePoint documents and choosers, allowing search
and selection of items across one or multiple SharePoint instances.
Installation
In your project's Django settings, add the app your INSTALLED_APPS list (at the end is fine):
INSTALLED_APPS = [
# ...
"wagtail_sharepoint",
]
Add the SharepointDocumentChooserBlock or SharepointPageChooserBlock block to your StreamField definition.
For example:
# yourapp/models.py
from wagtail.fields import StreamField
from wagtail.models import Page
from wagtail_sharepoint.blocks import (
SharepointDocumentChooserBlock,
SharepointPageChooserBlock,
)
class WonderfulPage(Page):
body = StreamField(
[
# ...
("sharepoint_document", SharepointDocumentChooserBlock()),
("sharepoint_page", SharepointPageChooserBlock()),
]
)
Finally, run Django's makemigrations and migrate commands to apply any model field changes to your project
$ python manage.py makemigrations
$ python manage.py migrate
Configuration
Entra
To start with, you will need to configure an Entra application, to get a tenant id, client id and secret.
Permission scopes: Sites.Read.All, Sites.ReadWrite.All
Wagtail settings
Add or update the WAGTAIL_SHAREPOINT configuration dictionary in your project's settings file.
The configuration dictionary has the following options:
WAGTAIL_SHAREPOINT = {
"TENANT_ID": "<Entra tenant id>",
"CLIENT_ID": "<Entra client id>",
"CLIENT_SECRET": "<Entra client secret>",
"SITE_ID": "<instance id>", # Either the Sharepoint instance id
# OR
"SITE_IDS": ["<instance_1_id>", "instance_2_id"], # or a list of instance IDs
"REGION": "<region here>", # Optional. Defaults to "GBR"
# for local development and debug. Works in conjunction with DEBUG=True
"DISABLE_CACHE": False, # Optional. Defaults to False.
}
A SharePoint site is identified by a unique ID that is a composite of the following values:
- Site collection hostname (e.g.
contoso.sharepoint.com) - Site collection unique ID (GUID. e.g.
f2f28bab-9c17-411d-bb28-2914b4957958) - Site unique ID (GUID. e.g.
aac37637-022b-45e3-9d25-59f7aa14d640)
You can use the full ID (contoso.sharepoint.com,f2f28bab-9c17-411d-bb28-2914b4957958,aac37637-022b-45e3-9d25-59f7aa14d640),
the site collection id (f2f28bab-9c17-411d-bb28-2914b4957958) or the site unique id (aac37637-022b-45e3-9d25-59f7aa14d640).
Contributing
All contributions are welcome! See CONTRIBUTING.md
Supported versions:
- Python 3.12, 3.13, 3.14, 3.15
- Django 5.2, 6.0, 6.1
- Wagtail 7.4 (LTS), 8.0
Metadata
Release files for wagtail-sharepoint 0.0.1
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 | |
|---|---|---|---|---|
| wagtail_sharepoint-0.0.1.tar.gz | 26.5 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wagtail_sharepoint-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 57.1 kB
Security for wagtail-sharepoint 0.0.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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for wagtail_sharepoint-0.0.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logA 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.