Skip to main content

A django CMS enabled application to handle redirects

Project description

Latest PyPI version Monthly downloads Python versions Latest Travis CI build status Test coverage Test coverage Code Climate

A django CMS enabled application to handle redirects

This is heavily borrowed from django.contrib.redirects with three major changes:

  • Selection of django CMS pages

  • Selection of redirect status code

  • Middleware can processed in the request or response phase

Why using process_request?

Doing database queries in the middleware process_request is heavily discouraged as it’s a performance hit, especially when doing redirects which are just a tiny part of the processed requests. Except that sometimes it’s just what you need (for example to “hide” content without deleting / unpublishing it) By caching both existing and non existing redirects for a given URL the performance hit is minimized for the use cases that requires process_request.

Documentation

The full documentation is at https://djangocms-redirect.readthedocs.io.

Installation

See https://djangocms-redirect.readthedocs.io/en/latest/installation.html

Features

  • Set old and new path, by selection existing django CMS pages or writing down the complete address

  • Select the redirect status code (301, 302)

  • Support for status code 410

Running Tests

Does the code actually work?

source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install -r requirements-test.txt
(myenv) $ python setup.py test

Credits

Tools used in rendering this package:

History

0.3.0 (2019-03-11)

  • Added compatibility to Django 2.0, 2.1

0.2.0 (2018-11-03)

  • Updated for Django 1.11

  • Added configurable cache timeout

  • Added configuration option to check redirect on 404 only

0.1.1 (2017-11-19)

  • Added missing migration.

  • Fixed compatibility issue with Django 1.8

0.1.0 (2016-02-01)

  • First release on PyPI.

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

djangocms-redirect-0.3.0.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

djangocms_redirect-0.3.0-py2.py3-none-any.whl (9.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file djangocms-redirect-0.3.0.tar.gz.

File metadata

  • Download URL: djangocms-redirect-0.3.0.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/2.7

File hashes

Hashes for djangocms-redirect-0.3.0.tar.gz
Algorithm Hash digest
SHA256 2b0c4ab994f65c1f04811d43665f1106702b68616f52921f40e4c2a7e45f2849
MD5 d146152abdf4bc3775aec3b622ff90ce
BLAKE2b-256 3de8a25ef07c6acf738c9d302830d982eebe05ab866cd31f5884c4fcd3dfe8f4

See more details on using hashes here.

File details

Details for the file djangocms_redirect-0.3.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for djangocms_redirect-0.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1f8618fc41cf6389b5aa83f0235c09ab37caee9d07a2272554d5ce85d7a2e127
MD5 1d0f7c853c4135f698483c47bd002d1f
BLAKE2b-256 bf0d983a0eaba06602a15066df54eccfcbb1e0c378741cefccb17af727172103

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