Skip to main content
Help improve PyPI by participating in a 5-minute user interface survey!

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.

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.1.1 (unreleased)

  • Added missing migration.
  • Fix compatibility issue with Django 1.8

0.1.0 (2016-02-01)

  • First release on PyPI.

Release history Release notifications

This version
History Node

0.1.1

History Node

0.1.0

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
djangocms_redirect-0.1.1-py2.py3-none-any.whl (10.5 kB) Copy SHA256 hash SHA256 Wheel 2.7 Nov 19, 2017
djangocms-redirect-0.1.1.tar.gz (8.4 kB) Copy SHA256 hash SHA256 Source None Nov 19, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page