wagtaildraftsharing
Share Wagtail drafts with private URLs.
wagtaildraftsharing makes it easier to share Wagtail draft content for review by users who don't have access to the Wagtail admin site. It allows you to generate random urls to expose the revisions of your Wagtail pages.
Setup
Install the package using pip:
pip install wagtaildraftsharing
Add wagtaildraftsharing as an installed app in your Django settings:
# in settings.py
INSTALLED_APPS = (
...
'wagtaildraftsharing',
'wagtail.admin',
...
)
Since wagtaildraftsharing overrides one of the wagtail.admin templates, it must be listed before wagtail.admin in the INSTALLED_APPS list.
This package also makes use of wagtail.snippets, so it must be included in your list of installed apps.
You must also have USE_TZ=True in your project settings to ensure expiry datetimes are all referencing the expected timezone - from Django 5, this defaults to True, whereas previously it was False.
Run migrations to create the required database tables:
python manage.py migrate wagtaildraftsharing
Add the wagtaildraftsharing urls to your urls.py:
# in urls.py
import wagtaildraftsharing.urls as wagtaildraftsharing_urls
urlpatterns += [
path("wagtaildraftsharing/", include(wagtaildraftsharing_urls)), # or whatever url you want
]
Each draft in the history page for any page (/admin/pages/<id>/history/) will now have an additional action - Copy external sharing url. Clicking this will generate a random url (and copy it to the clipboard) that can be shared with anyone. The url will display the draft version of the page.
All generated links can be viewed at /admin/wagtaildraftsharing/.
Each link can be edited to expire at a certain date, or to be disabled immediately.
In addition, it you can also make a sharing link directly from the Action Menu at the bottom of a page being edited, as long as there is a draft version saved since the last time the page was published
Settings
The following settings can be added to your Django settings file as keys in a WAGTAILDRAFTSHARING dictionary
WAGTAILDRAFTSHARING = {
...
"MAX_TTL": 123456,
...
}
MAX_TTL
The default expiry time for generated links, in seconds. Defaults to 28 days. Set it to a negative value to disable expiry.
ADMIN_MENU_POSITION
Set the integer priority to control where in the admin menu the link to the list of generated links sits. Defaults to 200.
VERBOSE_NAME
Provide a different singular label for a link. Defaults to "Draftsharing Link"
VERBOSE_NAME_PLURAL
Provide a different plural label for a link. Defaults to "Draftsharing Links"
MENU_ITEM_LABEL
Customise the label used in the page-level Action Menu for creating a link. Defaults to "Create draft sharing link",
Testing
To install testing dependencies locally run pip install -e ".[testing]"
Metadata
Release files for wagtaildraftsharing 0.3.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 |
|---|---|---|---|---|
| wagtaildraftsharing-0.3.0.tar.gz | 20.8 kB | With provenance | Details for wagtaildraftsharing-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wagtaildraftsharing-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for wagtaildraftsharing-0.3.0-py3-none-any.whl |
Total release size: 47.5 kB
Release files / wagtaildraftsharing-0.3.0.tar.gz
| Download URL | wagtaildraftsharing-0.3.0.tar.gz |
|---|---|
| Size | 20.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
450c756f600c8d43eb0391ebb6829d554a5501b58a3e7e525349dc0409cf2bdd
|
|
BLAKE2b-256 checksum How to use checksums |
dd9a09ba8bcb3c911541ca77d93a4afd1324071e3d35c8fcf24f2b1e2afbbce4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
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 May 21, 2025.
Transparency logRelease files / wagtaildraftsharing-0.3.0-py3-none-any.whl
| Download URL | wagtaildraftsharing-0.3.0-py3-none-any.whl |
|---|---|
| Size | 26.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2e77b46df0b164c089d25ff146e25fa3601e52de7ccaa9226925e6e6357fdeab
|
|
BLAKE2b-256 checksum How to use checksums |
6cbc6f785b74f0350214055d4b8c845c3b8d58caf70fb54f3cd29df59865d31a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
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 May 21, 2025.
Transparency logSecurity for wagtaildraftsharing 0.3.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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for wagtaildraftsharing-0.3.0.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 May 21, 2025.
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.