Skip to main content

Simplified Wagtail system text management

Project description

Wagtail System Text

Simplified Wagtail system text management


- Python 2.7
- Django 1.8+
- Wagtail 1.7+


Install the library with pip:


$ pip install wagtailsystemtext

Quick Setup

Make sure wagtailsystemtext is added to your ``INSTALLED_APPS``.

.. code:: python

# ...

Then add SiteSystemTextMiddleware to your middlewares.

.. code:: python

# ...



Drop in gettext replacement

.. code:: python

from wagtailsystemtext.utils import systemtext as _

_('main_label', group='buttons')
_('main_label', group='buttons', default='My label')


.. code:: python

{% load systemtext %}

{% systemtext "my_text" %}
{% systemtext "main_label" group "buttons" %}
{% systemtext "main_label" group "buttons" default "My label" %}

Management commands

- ``python find_and_add_systemtext``: Searches after your .py
and .html files after systemtext implementations and adds them to
each site.


- ``SYSTEMTEXT_CACHE_PREFIX``: Cache prefix (``"wagtailsystemtext"`` by
- ``SYSTEMTEXT_CACHE_EXPIRY``: Cache expiry in seconds (10 min by
- ``SYSTEMTEXT_REBUILD_ON_SAVE``: If cache should be rebuilt on save
(``True`` by default)
- ``SYSTEMTEXT_USE_DEFAULT_ON_EMPTY``: If present, use default value
when string is empty (``False`` by default)

Release start

These hooks will automatically bump the application version when using
``git flow release ...``

.. code:: bash

chmod +x $PWD/git-hooks/
ln -nfs $PWD/git-hooks/ .git/hooks/post-flow-release-start
ln -nfs $PWD/git-hooks/ .git/hooks/post-flow-hotfix-start


- [x] ``trans`` template tag support
- [x] Wagtail admin view with site permissions
- [x] Cache-rebild on save through admin
- [x] Default text support (on declaration)
- [x] Lazy text transforms
- [x] Add setting for fallbacking to default if string is empty
- [ ] Automatic tag discovery
- [ ] Sync command between sites
- [ ] Group filter in Wagtail admin
- [ ] Last accessed timestamps
- [ ] ``blocktrans`` template tag support


Want to contribute? Awesome. Just send a pull request.


Wagtail System Text is released under the `MIT
License <>`__.

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

wagtailsystemtext-1.0.3.tar.gz (10.0 kB view hashes)

Uploaded source

Supported by

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