Skip to main content

Wagtail previews in headless mode.

Project description

Wagtail Headless Preview

Setup

Install using pip:

pip install wagtail-headless-preview

After installing the module, add wagtail_headless_preview to installed apps in your settings file:

INSTALLED_APPS = [
    ...
    'wagtail_headless_preview',
]

then configure the preview client URL.

For a multi-site setup, you can use HEADLESS_PREVIEW_CLIENT_URLS:

HEADLESS_PREVIEW_CLIENT_URLS = {
    'default': 'http://localhost:8020/',
    'site1.example.com': 'http://localhost:8020/',
    'site2.example.com': 'http://localhost:8021/',
}

For single sites, the configuration can be:

HEADLESS_PREVIEW_CLIENT_URLS = {
    'default': 'http://localhost:8020/',
}

Alternatively, you can use HEADLESS_PREVIEW_CLIENT_URL:

HEADLESS_PREVIEW_CLIENT_URL = 'http://localhost:8020/'

Usage

Add HeadlessPreviewMixin to your page class:

from wagtail_headless_preview.models import HeadlessPreviewMixin

class MyWonderfulPage(HeadlessPreviewMixin, Page):
    pass

Credits

  • Matthew Westcott (@gasman), initial proof of concept
  • Karl Hobley (@kaedroho), improvements

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wagtail-headless-preview-0.0.2.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file wagtail-headless-preview-0.0.2.tar.gz.

File metadata

  • Download URL: wagtail-headless-preview-0.0.2.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for wagtail-headless-preview-0.0.2.tar.gz
Algorithm Hash digest
SHA256 c2ed9483aab77a550023d1d711136bb5491b4bad7e3d11f1f058e79dc345a5fe
MD5 56f5f4d977ea3024fdfd157283c899a1
BLAKE2b-256 9d9f6c9e0d6b5039448ca791d4cc96889cf0c158c6af66044047a1cbb447440b

See more details on using hashes here.

File details

Details for the file wagtail_headless_preview-0.0.2-py2-none-any.whl.

File metadata

  • Download URL: wagtail_headless_preview-0.0.2-py2-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for wagtail_headless_preview-0.0.2-py2-none-any.whl
Algorithm Hash digest
SHA256 3146be430967461cab56f76012a08cf05aec8be56e3cce8757fc5f140b3465e2
MD5 d55060c4e8195fa6842fca382c04d63b
BLAKE2b-256 8c3bcd7ae15dfe9dd59896f8511d8703c6e28348048904f20c856e5d434a6393

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page