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.10 - 3.14
  • Django 5.2 - 6.0
  • Wagtail 7.0 - 7.4

Installation

  • Run pip install wagtail-editable-help
  • Add "wagtail_editable_help" 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.models import HelpText

then replace help_text="Some help text" with help_text=HelpText("model", "identifier", default="Some help text"). The model and identifier strings serve as a unique identifer for the help text string and to organise the strings in the admin interface - they do not need to exactly match the model or field name. HelpText is valid within any definition that supports help text strings, not just model fields - such as form fields and StreamField blocks.

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.3.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wagtail_editable_help-0.3.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file wagtail_editable_help-0.3.0.tar.gz.

File metadata

  • Download URL: wagtail_editable_help-0.3.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for wagtail_editable_help-0.3.0.tar.gz
Algorithm Hash digest
SHA256 2e5899771dff725d098c97f5095b11ec6e2eba8326558caea1890985fdfb02fa
MD5 3d9869c5ff9105f1b1099d17064ae10a
BLAKE2b-256 202faf2f3f2a0475cf09b870b92c7d3b0f89479ff667c5600d27c31943f86b2c

See more details on using hashes here.

File details

Details for the file wagtail_editable_help-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for wagtail_editable_help-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 536b2560a4ee3fc68f7bcffe565bbbdc8dce3832c51b599289289d3b341b4029
MD5 45aa79e6964fc8e88c401fdd16c22681
BLAKE2b-256 8723acdc1a50e0ae4ae68afd57f88f78a88b10a5d22d34de38e527934f4941bc

See more details on using hashes here.

Supported by

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