Easier sharing of Wagtail drafts
Project description
wagtail-sharing
Easier sharing of Wagtail drafts.
Wagtail Sharing 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 define an alternate hostname and/or port on which to expose the latest revision of all of your Wagtail pages.
For example, let’s say your Wagtail site is running on http://mysite.com. You’ve created a draft page at slug /path/to/draft, but haven’t yet published it. Wagtail Sharing lets you expose that draft page at some other domain, for example http://sharing.mysite.com/path/to/draft.
In another use case, you might have a published page at http://mysite.com/already/published/page, and you’ve made some draft changes. Wagtail Sharing lets you expose those draft changes at http://sharing.mysite.com/already/published/page while still keeping the same published content at your regular domain.
These examples obviously work best when you have some method of restricting access to http://sharing.mysite.com, for example by only exposing that subdomain on a private network.
Wagtail Sharing lets you create separate sharing sites for each Wagtail Site you have defined. It also supports a configurable visual banner on shared pages to remind reviewers that content may differ from your published site.
This new logic only applies to GET requests. Other HTTP methods like POST defer to standard Wagtail handling.
Setup
Install the package using pip:
$ pip install wagtail-sharing
Add wagtailsharing as an installed app in your Django settings:
# in settings.py
INSTALLED_APPS = (
...
'wagtailsharing',
...
)
Run migrations to create required database tables:
$ manage.py migrate wagtailsharing
Replace use of Wagtail’s catch-all URL pattern:
# in urls.py
-from wagtail.wagtailcore import urls as wagtail_urls
+from wagtailsharing import urls as wagtailsharing_urls
...
-urlpatterns.append(url(r'', include(wagtail_urls)))
+urlpatterns.append(url(r'', include(wagtailsharing_urls)))
Hooks
As with normal page serving, the serving of shared pages continues to respect Wagtail’s built-in before_serve_page hook.
This project adds these additional hooks:
Compatibility
This project has been tested for compatibility with:
Python 2.7, 3.5, 3.6
Django 1.8-1.11
Wagtail 1.6-1.13
Open source licensing info
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
Hashes for wagtail_sharing-0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ffc6c2da814f344a49973caf9e203a4d73afb73fba4275fc05b6a3ef0d9762d |
|
MD5 | d908c1061c3f0519fef10f194436a29c |
|
BLAKE2b-256 | a7fa810edccbebf9edea154342b635dcb02c00f2330d840ad96812056315473d |