Skip to main content

UNKNOWN

Project description

Built for use on grovemade.com, Django Redirector adds simple admin powered 301 redirects.

Example rules:

Path: /foo/bar/ Type: exact (case insensitive)

Path: /products/ Type: startswith

Uses caching heavily because the middleware is called on every request.

  1. redirect rules are cached once

  2. redirect results are cached per request path

Cache is invalidated when a new rule is saved/added.

Installation

Add the package to your python path, pip install, setup.py install, etc.

Add ‘django_redirects’ to INSTALLED_APPS

Add ‘django_redirects.middleware.RedirectMiddleware’ immediately after CommonMiddleware in MIDDLEWARE_CLASSES

Syncdb, then navigate to your admin panel!

Settings

REDIRECT_CACHE_TIME: _default: 60*30_ Seconds to cache individual page redirect results.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-redirector-0.1.1.tar.gz (84.7 kB view details)

Uploaded Source

File details

Details for the file django-redirector-0.1.1.tar.gz.

File metadata

File hashes

Hashes for django-redirector-0.1.1.tar.gz
Algorithm Hash digest
SHA256 dd111cdd7abca11f8dd792e3da32a5957fd532c1ca60c1d9b520b1662dc8ec52
MD5 65fb21c9bdb763d9a0c4c7b0b3c44842
BLAKE2b-256 7bd08f8ecbe37a325548ceb1aa29c17e882598b0c91446cd1394305619b4b91d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page