Make help text editable in the Wagtail admin
Project description
Wagtail Editable Help
Make help text editable in the Wagtail admin
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for wagtail-editable-help-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f798ca8f71fa8aa9e7eb15ef890a86b4022fa9ceda379e3870f66ce02c8d6ca |
|
MD5 | 3328ae928b3142dda3ea3bdd72276628 |
|
BLAKE2b-256 | 53f11a60b143e5113a5deb76b3001d25672b81ffc80079f387b25a66791c26f6 |
Close
Hashes for wagtail_editable_help-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b247c845691976733f25eaff326de856740b0243cae1264e2a029624cf8dd0d |
|
MD5 | f25e56644bae9b1292b1eed9d2829c1a |
|
BLAKE2b-256 | 6a4f3f882c351f597832ddf0cffc9f607d945d71a128661db18cb83da84cd6f1 |