like django.contrib.redirects on steroids. maybe.
Project description
django painless redirects
============
.. image:: https://travis-ci.org/bnzk/django-painless-redirects.svg
:target: https://travis-ci.org/bnzk/django-painless-redirects
like django.contrib.redirects, on steroids. maybe.
Implemented:
- 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
INSTALLED_APPS = (
...,
'painless_redirects',
)
Add the following middlware to MIDDLEWARE_CLASSES (1.10 style middlewares will be supported soon),
to make basic redirects work.
.. code-block:: bash
painless_redirects.middleware.ManualRedirectMiddleware
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
painless_redirects.middleware.ForceSiteDomainRedirectMiddleware
Development
------------
- there is test app, available with `./manage.py runserver`.
- to run tests: ./manage.py test
- to run tests with django 1.8 / 1.9 / 1.10: `tox`
Contributions
-------------
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
============
.. image:: https://travis-ci.org/bnzk/django-painless-redirects.svg
:target: https://travis-ci.org/bnzk/django-painless-redirects
like django.contrib.redirects, on steroids. maybe.
Implemented:
- 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
INSTALLED_APPS = (
...,
'painless_redirects',
)
Add the following middlware to MIDDLEWARE_CLASSES (1.10 style middlewares will be supported soon),
to make basic redirects work.
.. code-block:: bash
painless_redirects.middleware.ManualRedirectMiddleware
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
painless_redirects.middleware.ForceSiteDomainRedirectMiddleware
Development
------------
- there is test app, available with `./manage.py runserver`.
- to run tests: ./manage.py test
- to run tests with django 1.8 / 1.9 / 1.10: `tox`
Contributions
-------------
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django-painless-redirects-0.1.tar.gz
.
File metadata
- Download URL: django-painless-redirects-0.1.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8202bce4eb2bcf8e5da605b8b175282698b918da98f30dc5ab1cabb90844f888 |
|
MD5 | 534d21937184dd6c9c82c6d3d368cc9a |
|
BLAKE2b-256 | 54c7b11b385d83b46578314a12e2c4b8ebf40bca2cc7465283fdba7f40037c87 |
File details
Details for the file django_painless_redirects-0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: django_painless_redirects-0.1-py2.py3-none-any.whl
- Upload date:
- Size: 20.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d988c15fcaad2ca67f020eb93f6616790a85bbb1bd739c2bfa7148a1b031f1ae |
|
MD5 | 9355457d5f6b4353739a44fae63b2143 |
|
BLAKE2b-256 | 6909a74a3af703fac803ee303288d4a5799ef89a7b85e695da6e94c261543a12 |