Skip to main content

A lighter admin for wagtail

Project description

http://img.shields.io/pypi/v/wagtail_lightadmin.svg http://img.shields.io/badge/license-MIT-blue.svg http://img.shields.io/travis/leukeleu/wagtail_lightadmin/master.svg

Features

This app customises the wagtail admin as follows:

Rich text

Some of the less useful features are removed (HR, undo/redo, H4, H5). Headings/paragraph come first (though https://stackoverflow.com/questions/10773813/adding-something-to-the-top-of-a-json-object). The active state of the rich text (.expand) does not expand anymore

Publication flow

The “submit for moderation” is hidden (it’s mostly confusing for the type of clients we have).

Provides a LinkBlock

It had the same UI as when you insrt a link in a RichText but has the advantage of being avialable out of it.

In case you are using this block to replace a PageChooserBlock you can also use the pagechooser_fallback template tag. The PageChooserBlock initially only saves the pk of the page you want to link to. This templatetag gets the corresponding page and extracts the URL and the pagetitle from it to try and display what you would expect. A similar logic is used to try and keep the page the editor initially picked on the admin side.

Install & setup

pip install wagtail_lightadmin

Add wagtail_lightadmin to your installed apps.

Tell Wagtail to use the light rich text widget in your settings_default.py:

# For Wagtail < 1.12
WAGTAILADMIN_RICH_TEXT_EDITORS = {
    # Original setting
    # 'default': {
    #     'WIDGET': 'wagtail.wagtailadmin.rich_text.HalloRichTextArea'
    # },
    'default': {
        'WIDGET': 'wagtail_lightadmin.rich_text.LighterRichTextArea'
    },
}

# For Wagtail >= 1.12
WAGTAILADMIN_RICH_TEXT_EDITORS = {
    'default': {
        'WIDGET': 'wagtail.wagtailadmin.rich_text.HalloRichTextArea',
        'OPTIONS': {
            'plugins': {
                'halloheadings': {'formatBlocks': ['p', 'h2', 'h3']},
                'halloformat': {},
                'hallolists': {},
                'hallowagtaillink': {},
                'hallorequireparagraphs': {},
                'hallowagtailembeds': {},
                'hallowagtailimage': {},
                'hallowagtaildoclink': {},
            },
        }
    },
}

Make sure django knows about the new static files

manage.py collectstatic –no-input

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_lightadmin-0.9.tar.gz (11.5 kB view details)

Uploaded Source

File details

Details for the file wagtail_lightadmin-0.9.tar.gz.

File metadata

  • Download URL: wagtail_lightadmin-0.9.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.9.0 pkginfo/1.4.1 requests/2.14.2 setuptools/18.5 requests-toolbelt/0.8.0 tqdm/4.11.2 CPython/2.7.10

File hashes

Hashes for wagtail_lightadmin-0.9.tar.gz
Algorithm Hash digest
SHA256 2b157228c1746e7bd8057120cce46f0b98376b57f2bb69da532e17c31c005c76
MD5 610e3ed312bf03a6e37597b44f334068
BLAKE2b-256 97572763d38ac973e058b95ddf594a7b3014b38adb9f9f9c9209623e0851acb5

See more details on using hashes here.

Provenance

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