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 details)
File details
Details for the file readyrector-1.0.tar.gz
.
File metadata
- Download URL: readyrector-1.0.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06f2407416e831fb1c84ed62871f49b9d62de64f0286fa34d15f953b48501117 |
|
MD5 | cf1a7b400baa2184ff6cd2e33ec7ed30 |
|
BLAKE2b-256 | c1af335ce0251c1f26980544dc871590f752866c1e738985b9795a9902be3146 |