Share wagtail drafts with private URLs.
Project description
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 wagtail-sharing
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 after 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.
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.
Settings
The following settings can be added to your Django settings file:
WAGTAILDRAFTSHARING_MAX_AGE
The default expiry time for generated links, in seconds. Defaults to 1 week. Set it to a negative value to disable expiry.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file wagtaildraftsharing-0.0.4.tar.gz
.
File metadata
- Download URL: wagtaildraftsharing-0.0.4.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c22580535b4f31df29c57cf239c80a062cc630470e9bf3b98fcaca72b0389758 |
|
MD5 | ada6928e082bf62e49ccb8c47f113fa8 |
|
BLAKE2b-256 | b3106fdccad08d3bed37979ba6b7c08fafbf3ad857ed9b14e851622242bd6e61 |
File details
Details for the file wagtaildraftsharing-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: wagtaildraftsharing-0.0.4-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8e8614916c089bf5364ca8cd9052303da1020ff39e6aabb9a6faf4977214fb6 |
|
MD5 | b8862490014ffd7cfa6b44ca3f158214 |
|
BLAKE2b-256 | cd9ba86874e75a6f6e3e86a8c92df87dd1d04d17f0384b2ff1154343efcf4b05 |