Wagtail Personalisation is a fully-featured personalisation module for Wagtail CMS. It enables editors to create customised pages - or parts of pages - based on segments whose rules are configured directly in the admin interface.
Wagtail Personalisation requires Wagtail 6.3+ and Django 4.2+
To install the package with pip:
pip install wagtail-personalisationNext, include the wagtail_personalisation, 'wagtail_modeladmin'
and wagtailfontawesomesvg apps in your project's INSTALLED_APPS:
INSTALLED_APPS = [
# ...
'wagtail_modeladmin', # if Wagtail >=5.1; Don't repeat if it's there already
'wagtail.contrib.modeladmin', # if Wagtail <5.1; Don't repeat if it's there already
'wagtail_personalisation',
'wagtailfontawesomesvg',
# ...
]Make sure that django.contrib.sessions.middleware.SessionMiddleware has
been added in first, this is a prerequisite for this project.
MIDDLEWARE = [
'django.contrib.sessions.middleware.SessionMiddleware',
# ...
]You can find more information about installing, extending and using this module on Read the Docs.
To experiment with the package you can use the sandbox provided in
this repository. To install this you will need to create and activate a
virtualenv and then run make sandbox. This will start a fresh Wagtail
install, with the personalisation module enabled, on http://localhost:8000
and http://localhost:8000/cms/. The superuser credentials are
superuser@example.com with the password testing.
To make changes to this project, first clone this repository:
git clone https://github.com/wagtail-nest/wagtail-personalisation.git
cd wagtail-personalisationWith your preferred virtualenv activated, install testing dependencies:
python -m pip install --upgrade pip>=21.3
python -m pip install -e .[test] -UNow you can run tests as shown below:
toxor, you can run them for a specific environment tox -e py314-dj60-wt74 or specific test
tox -e py314-dj60-wt74 -- tests/unit/test_foo.py::test_bar.

