Skip to main content

A Sharepoint document integration for Wagtail

License: BSD-3-Clause Ruff PyPI version Build status

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

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-sharepoint 0.0.2
File Size Uploaded Provenance
wagtail_sharepoint-0.0.2.tar.gz 26.7 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for wagtail-sharepoint 0.0.2
File Interpreter ABI Platform
wagtail_sharepoint-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 57.8 kB

Release files / wagtail_sharepoint-0.0.2.tar.gz

Download URL wagtail_sharepoint-0.0.2.tar.gz
Size 26.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1121c674a4ac3fa9cc09afa244e16a795fb43b96113c8cef6caa1d88707b495d
BLAKE2b-256 checksum
How to use checksums
6511f17f083ac4b6a9b4557f361cbe4b2372e84a8a9e1a57ceeaca86eeef23f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

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 20, 2026.

Transparency log

Release files / wagtail_sharepoint-0.0.2-py3-none-any.whl

Download URL wagtail_sharepoint-0.0.2-py3-none-any.whl
Size 31.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aa50c1d1956bdfa964d6dcc70f83330e44c28b037296f882ae073380165f8497
BLAKE2b-256 checksum
How to use checksums
d5562e6f0384d9e392724ce4d49da31aecf31be21f66e95bfc0c481747be7c7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

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 20, 2026.

Transparency log

Security for wagtail-sharepoint 0.0.2

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.

Select from 2 files

Attestation for wagtail_sharepoint-0.0.2.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 20, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files Full provenance

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