Metadata-Version: 2.4
Name: wagtail-personalisation
Version: 0.17.0
Summary: A Wagtail add-on for showing personalized content
Author-email: Lab Digital BV and others <opensource@labdigital.nl>
License-Expression: MIT
Project-URL: Changelog, https://github.com/wagtail-nest/wagtail-personalisation/blob/main/CHANGELOG.md
Project-URL: Source, https://github.com/wagtail-nest/wagtail-personalisation
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Framework :: Django :: 5.2
Classifier: Framework :: Django :: 6.0
Classifier: Framework :: Wagtail
Classifier: Framework :: Wagtail :: 7
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Internet :: WWW/HTTP :: Site Management
Requires-Python: >=3.10
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: pycountry
Requires-Dist: user-agents>=1.1
Requires-Dist: wagtail>=7
Requires-Dist: wagtail-font-awesome-svg>=1.0.1
Requires-Dist: wagtail-modeladmin>=1
Provides-Extra: docs
Requires-Dist: sphinx>=1.7.6; extra == "docs"
Requires-Dist: sphinx-rtd-theme>=0.4; extra == "docs"
Provides-Extra: test
Requires-Dist: django-debug-toolbar>=6; extra == "test"
Requires-Dist: factory-boy>=3.3; extra == "test"
Requires-Dist: freezegun>=1.5; extra == "test"
Requires-Dist: pre-commit>=4; extra == "test"
Requires-Dist: pytest>=7.4; extra == "test"
Requires-Dist: pytest-cov>=4; extra == "test"
Requires-Dist: pytest-django>=4.8; extra == "test"
Requires-Dist: pytest-mock>=3.10; extra == "test"
Requires-Dist: pytest-sugar>=0.9.4; extra == "test"
Requires-Dist: wagtail-factories>=4.2; extra == "test"
Dynamic: license-file

.. image:: https://raw.githubusercontent.com/wagtail-nest/wagtail-personalisation/refs/heads/main/logo.png
   :height: 261
   :width: 300
   :scale: 50
   :alt: Prism logo
   :align: center

Wagtail Personalisation
=======================

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 CMS: https://wagtail.org/


.. image:: https://raw.githubusercontent.com/wagtail-nest/wagtail-personalisation/refs/heads/main/docs/_static/images/segment_dashboard_view.png
    :alt: The segment dashboard view


Instructions
------------
Wagtail Personalisation requires Wagtail 7.0+ and Django 5.2+

To install the package with pip:

.. code-block:: console

    pip install wagtail-personalisation

Next, include the ``wagtail_personalisation``, ``'wagtail_modeladmin'``
and ``wagtailfontawesomesvg`` apps in your project's ``INSTALLED_APPS``:

.. code-block:: python

    INSTALLED_APPS = [
        # ...
        'wagtail.contrib.modeladmin',  # 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.

.. code-block:: python

    MIDDLEWARE = [
        'django.contrib.sessions.middleware.SessionMiddleware',
        # ...
    ]


Documentation
-------------

You can find more information about installing, extending and using this module
on `Read the Docs`_.

.. _Read the Docs: http://wagtail-personalisation.readthedocs.io


Sandbox
-------

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``.


Contributing
------------

Install
~~~~~~~

To make changes to this project, first clone this repository:

.. code-block:: sh

    git clone https://github.com/wagtail-nest/wagtail-personalisation.git
    cd wagtail-personalisation

With your preferred virtualenv activated, install testing dependencies:

Using pip
^^^^^^^^^

.. code-block:: sh

    python -m pip install --upgrade pip>=21.3
    python -m pip install -e .[test] -U

How to run tests
~~~~~~~~~~~~~~~~

Now you can run tests as shown below:

.. code-block:: sh

    tox

or, 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``.

Acknowledgements
----------------

This project is currently maintained by the Wagtail Nest team.

It was originally developed by Boris Besemer (@blurrah) and Jasper Berghoef
(@jberghoef) for Lab Digital (https://labdigital.nl)
