Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,16 @@ jobs:
runs-on: ubuntu-latest
needs:
- tests
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing

if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.12"

- name: Build wheel
run: |
Expand Down
39 changes: 0 additions & 39 deletions README.md

This file was deleted.

72 changes: 72 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
django-regex-redirects
======================
:Version: 0.7.0
:Source: https://github.com/maykinmedia/django-regex-redirects
:Keywords: Django, regex
:PythonVersion: 3.8

|build-status| |code-quality| |black| |coverage|

|python-versions| |django-versions| |pypi-version|


Django redirects, with regular expressions. It is a modified version of
django.contrib.redirects.

Features
========

- Redirect your visitors using regular expressions
- Configurable via the admin
- Redirects are exportable as .csv

https://pypi.org/pypi/django-regex-redirects

Install
=======

``pip install django-regex-redirects``

Add ``regex_redirects`` to your ``INSTALLED_APPS``:

.. code:: python

INSTALLED_APPS = (
...
"regex_redirects",
...
)

Add the middleware to your ``MIDDLEWARE``:

.. code:: python

MIDDLEWARE = [
"regex_redirects.middleware.RedirectFallbackMiddleware"
...
]

Run ``manage.py migrate`` and you’re good to go!

.. |build-status| image:: https://github.com/maykinmedia/django-regex-redirects/actions/workflows/ci.yml/badge.svg
:alt: Build status
:target: https://github.com/maykinmedia/django-regex-redirects/actions/workflows/ci.yml

.. |code-quality| image:: https://github.com/maykinmedia/django-regex-redirects/actions/workflows/code-quality.yml/badge.svg
:alt: Code quality checks
:target: https://github.com/maykinmedia/django-regex-redirects/actions/workflows/code-quality.yml

.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black

.. |coverage| image:: https://codecov.io/gh/maykinmedia/django-regex-redirects/branch/main/graph/badge.svg
:target: https://codecov.io/gh/maykinmedia/django-regex-redirects
:alt: Coverage status


.. |python-versions| image:: https://img.shields.io/pypi/pyversions/django-regex-redirects.svg

.. |django-versions| image:: https://img.shields.io/pypi/djversions/django-regex-redirects.svg

.. |pypi-version| image:: https://img.shields.io/pypi/v/django-regex-redirects.svg
:target: https://pypi.org/project/django-regex-redirects/
13 changes: 12 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description = "Django redirects, with regular expressions"
authors = [
{name = "Alex de Landgraaf", email = "[email protected]"}
]
readme = "README.md"
readme = "README.rst"
license = {file = "LICENSE"}
keywords = ["Django", "regex"]
classifiers = [
Expand Down Expand Up @@ -46,6 +46,9 @@ tests = [
"black",
"flake8",
]
release = [
"bump-my-version",
]

[tool.setuptools.packages.find]
include = ["regex_redirects*"]
Expand Down Expand Up @@ -84,3 +87,11 @@ omit = [

[tool.coverage.html]
directory = "cover"

[tool.bumpversion]
current_version = "0.7.0"

[[tool.bumpversion.files]]
filename = "README.rst"
search = ":Version: {current_version}"
replace = ":Version: {new_version}"