|
| 1 | +django-regex-redirects |
| 2 | +====================== |
| 3 | +:Version: 0.7.0 |
| 4 | +:Source: https://github.com/maykinmedia/django-regex-redirects |
| 5 | +:Keywords: Django, regex |
| 6 | +:PythonVersion: 3.8 |
| 7 | + |
| 8 | +|build-status| |code-quality| |black| |coverage| |
| 9 | + |
| 10 | +|python-versions| |django-versions| |pypi-version| |
| 11 | + |
| 12 | + |
| 13 | +Django redirects, with regular expressions. It is a modified version of |
| 14 | +django.contrib.redirects. |
| 15 | + |
| 16 | +Features |
| 17 | +======== |
| 18 | + |
| 19 | +- Redirect your visitors using regular expressions |
| 20 | +- Configurable via the admin |
| 21 | +- Redirects are exportable as .csv |
| 22 | + |
| 23 | +https://pypi.org/pypi/django-regex-redirects |
| 24 | + |
| 25 | +Install |
| 26 | +======= |
| 27 | + |
| 28 | +``pip install django-regex-redirects`` |
| 29 | + |
| 30 | +Add ``regex_redirects`` to your ``INSTALLED_APPS``: |
| 31 | + |
| 32 | +.. code:: python |
| 33 | +
|
| 34 | + INSTALLED_APPS = ( |
| 35 | + ... |
| 36 | + "regex_redirects", |
| 37 | + ... |
| 38 | + ) |
| 39 | +
|
| 40 | +Add the middleware to your ``MIDDLEWARE``: |
| 41 | + |
| 42 | +.. code:: python |
| 43 | +
|
| 44 | + MIDDLEWARE = [ |
| 45 | + "regex_redirects.middleware.RedirectFallbackMiddleware" |
| 46 | + ... |
| 47 | + ] |
| 48 | +
|
| 49 | +Run ``manage.py migrate`` and you’re good to go! |
| 50 | + |
| 51 | +.. |build-status| image:: https://github.com/maykinmedia/django-regex-redirects/actions/workflows/ci.yml/badge.svg |
| 52 | + :alt: Build status |
| 53 | + :target: https://github.com/maykinmedia/django-regex-redirects/actions/workflows/ci.yml |
| 54 | + |
| 55 | +.. |code-quality| image:: https://github.com/maykinmedia/django-regex-redirects/actions/workflows/code-quality.yml/badge.svg |
| 56 | + :alt: Code quality checks |
| 57 | + :target: https://github.com/maykinmedia/django-regex-redirects/actions/workflows/code-quality.yml |
| 58 | + |
| 59 | +.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg |
| 60 | + :target: https://github.com/psf/black |
| 61 | + |
| 62 | +.. |coverage| image:: https://codecov.io/gh/maykinmedia/django-regex-redirects/branch/main/graph/badge.svg |
| 63 | + :target: https://codecov.io/gh/maykinmedia/django-regex-redirects |
| 64 | + :alt: Coverage status |
| 65 | + |
| 66 | + |
| 67 | +.. |python-versions| image:: https://img.shields.io/pypi/pyversions/django-regex-redirects.svg |
| 68 | + |
| 69 | +.. |django-versions| image:: https://img.shields.io/pypi/djversions/django-regex-redirects.svg |
| 70 | + |
| 71 | +.. |pypi-version| image:: https://img.shields.io/pypi/v/django-regex-redirects.svg |
| 72 | + :target: https://pypi.org/project/django-regex-redirects/ |
0 commit comments