Easy to implement redirect middleware, which loads redirects from a configurable backend.
Project description
Easy to implement redirect middleware, which loads redirects from a configurable backend.
Installation
pip install readyrector
Usage
# settings.py
INSTALLED_APPS = (
# ...
'readyrector',
# ...
)
# put at the end of the middleware list as a last resort
MIDDLEWARE = (
# ...
'readyrector.middleware.RedirectDatabaseMiddleware',
)
RedirectDatabaseMiddleware
Gets redirects from database records. Implement a view or API to manage these records.
RedirectURLConfMiddleware
Gets redirects from a URL conf file. Requires setting READYRECTOR_URLCONF
Settings
READYRECTOR_URLCONF
Default: ''
Required when RedirectURLConfMiddleware is used. Expects a path to a URL conf file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
readyrector-1.0.tar.gz
(6.0 kB
view hashes)