Skip to main content

Make help text editable in the Wagtail admin

Project description

Wagtail Editable Help

Make help text editable in the Wagtail admin

License

PyPI version Editable Help CI

Links

Supported versions

  • Python 3.7 - 3.10
  • Django 3.2 - 4.1
  • Wagtail 2.15 - 4.0

Installation

  • Run pip install wagtail-editable-help
  • Add "wagtail_editable_help" and "wagtail.contrib.modeladmin" to INSTALLED_APPS
  • Run ./manage.py migrate
  • Optional: add "wagtail_editable_help.middleware.EditableHelpMiddleware" to the MIDDLEWARE setting, somewhere below "django.contrib.auth.middleware.AuthenticationMiddleware". Enabling this middleware will add an "Edit" link at the point the help text is shown, to allow superusers and other users with the appropriate permission to edit the help text.

Usage

For any help_text argument that you wish to make editable:

from wagtail_editable_help import HelpText

then replace help_text="Some help text" with help_text=HelpText("model", "identifier", default="Some help text"). For example:

class HomePage(Page):
    tagline = models.CharField(max_length=255, help_text="Write something snappy here")

could be rewritten to:

from wagtail_editable_help.models import HelpText

class HomePage(Page):
    tagline = models.CharField(max_length=255, help_text=HelpText("Home page", "tagline", default="Write something snappy here"))

The help text string will then be made available for editing within the Wagtail admin under Settings -> Help text, under the heading "Home page tagline".

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-editable-help-0.1.0.tar.gz (9.4 kB view hashes)

Uploaded Source

Built Distribution

wagtail_editable_help-0.1.0-py3-none-any.whl (7.3 kB view hashes)

Uploaded Python 3

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