wagtail-automatic-redirects

Helpers for Wagtail Redirects


License
BSD-3-Clause
Install
pip install wagtail-automatic-redirects==1.0.0

Documentation

wagtail-automatic-redirects

Package to help with Wagtail URL redirects

Installation

pip install wagtail-automatic-redirects

Add the package to your project's settings

INSTALLED_APPS = (
    # ... Other apps
  'wagtail_automatic_redirects',
  'wagtail.wagtailredirects',
    # ... Other apps
)

Make sure the INSTALLED_APPS setting include 'wagtail.wagtailredirects' app from Wagtail.

Also, check the MIDDLEWARE setting include

'wagtail.wagtailredirects.middleware.RedirectMiddleware',

Usage

Wagtail comes with a redirects app which helps to manually create redirects in Wagtail admin. This helper app helps to automatically create redirects when the URL of Page is changed. Redirects will be created for the page and all its child pages automatically. This project uses the page revisions and publish signal to automate the redirects creation process. Please note that no automatic redirects will be created when a page is moved in site tree using the Move option.