Giter Club home page Giter Club logo

wagtaildraftsharing's Introduction

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.

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.

Screenshot

All generated links can be viewed at /admin/wagtaildraftsharing/.

Screenshot

Each link can be edited to expire at a certain date, or to be disabled immediately.

Screenshot

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.

wagtaildraftsharing's People

Contributors

yurakim-bcm avatar kira009 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.