The redirectnode page type

The redirectnode allows adding a URL path that redirects the website visitor.

../_images/redirectnode-admin.png

Installation

Install the dependencies via pip:

pip install django-fluent-pages[redirectnode]

This installs the django-any-urlfield package.

Add the following settings to settings.py:

INSTALLED_APPS += (
    'fluent_pages.pagetypes.redirectnode',
    'any_urlfield',
)

Configuration

This page type works out of the box.

By default, the admin can choose between an “External URL” and “Page”. Other models can also be included too, as long as they have a get_absolute_url method. Register the respective models to django-any-urlfield:

from any_urlfield.models import AnyUrlField
AnyUrlField.register_model(Article)

See the any_urlfield.models documentation for details.