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

  • Added missing migration.

  • Fix 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.1.1.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

djangocms_redirect-0.1.1-py2.py3-none-any.whl (10.5 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

File hashes

Hashes for djangocms-redirect-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f232fb2e31431601136f6a4c8be7eba274f2b032bccbe952556617c9b672f076
MD5 8b891f804836e86045767e8a67a96961
BLAKE2b-256 1f119daa18d59105a684d526b417760557416121887ef86f8c788b56e87d0385

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for djangocms_redirect-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 729b2d6069532f04fdc1c019f314c0bf96dbe10592185928054a93f874bd973b
MD5 382e3391c4a4a26e64652c8e65e1db93
BLAKE2b-256 56755ae5a2d9182c37c803492d0104be5dc8e9537ec12c0d2cf4c531bbe18c15

See more details on using hashes here.

Provenance

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