Skip to main content

Simple Redirects App, which is particularly useful in the cases where you want to update some existing URLs without compromising your Website SEO.

Project description

Build status Code health Python versions PyPI downloads Software license Project Status

Simple Redirects App, which is particularly useful in the cases where you want to update some existing URLs without compromising your Website SEO.

Installation

Install with pip:

$ pip install django-ok-redirects

Update INSTALLED_APPS:

INSTALLED_APPS = [
    ...
    'ok_redirects',
    ...
]

Make migrations

$ python manage.py migrate

Available settings

REDIRECTS_IGNORE_PATH_PREFIXES - Tuple of path prefixes to ignore.

For example:

REDIRECTS_IGNORE_PATH_PREFIXES = (
    '/api/v1/',
    '/uploads/',
    '/static/',
)

Basic example to use:

Add the redirects middleware to the MIDDLEWARE configuration:

MIDDLEWARE = [
    ...

    'ok_redirects.middleware.RedirectMiddleware'
]

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-ok-redirects-0.4.0.tar.gz (9.6 kB view hashes)

Uploaded Source

Built Distribution

django_ok_redirects-0.4.0-py3-none-any.whl (14.7 kB view hashes)

Uploaded Python 3

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