Skip to main content

like django.contrib.redirects on steroids. maybe.

Project description

django painless redirects

.. image::

like django.contrib.redirects, on steroids. maybe.


- simple redirects table, with that bit more flexibility / convenience
- limited wildcard matching
- move complete trees
- decide if you want to keep GET vars
- force site domain middleware, that redirects to current site's domain, if not already there

Yet to be done:

- APPEND_SLASH handling (when trying to redirect /whatever/was-here.html)
- contrib packages with "magic" redirects for django-cms, django-filer -> SEO is easy.

Installation & Usage

To get the latest stable release from PyPi

.. code-block:: bash

pip install django-painless-redirects

Add ``painless_redirects`` to your ``INSTALLED_APPS``

.. code-block:: python


Add the following middlware to MIDDLEWARE_CLASSES (1.10 style middlewares will be supported soon),
to make basic redirects work.

.. code-block:: bash


If you want to be redirected to the domain name entered in your current site (django.contrib.sites must be installed),
also add this middleware:

.. code-block:: bash


- there is test app, available with `./ runserver`.
- to run tests: ./ test
- to run tests with django 1.8 / 1.9 / 1.10: `tox`


If you want to contribute to this project, please perform the following steps

.. code-block:: bash

# Fork this repository
# Clone your fork
mkvirtualenv django-painless-redirects
pip install -r test_requirements.txt
git checkout -b feature_branch
# Implement your feature and tests
git add . && git commit
git push -u origin feature_branch
# Send us a pull request for your feature branch

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-painless-redirects-0.1.tar.gz (11.7 kB view hashes)

Uploaded source

Built Distribution

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