Skip to content

Commit 7f593b5

Browse files
authored
Merge pull request #24 from maykinmedia/feature/improvements
Feature/improvements
2 parents f318306 + 233788b commit 7f593b5

File tree

4 files changed

+87
-41
lines changed

4 files changed

+87
-41
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,16 @@ jobs:
5050
runs-on: ubuntu-latest
5151
needs:
5252
- tests
53+
permissions:
54+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
5355

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

5658
steps:
5759
- uses: actions/checkout@v4
5860
- uses: actions/setup-python@v5
5961
with:
60-
python-version: "3.10"
62+
python-version: "3.12"
6163

6264
- name: Build wheel
6365
run: |

README.md

Lines changed: 0 additions & 39 deletions
This file was deleted.

README.rst

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
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/

pyproject.toml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description = "Django redirects, with regular expressions"
99
authors = [
1010
{name = "Alex de Landgraaf", email = "alex@maykinmedia.nl"}
1111
]
12-
readme = "README.md"
12+
readme = "README.rst"
1313
license = {file = "LICENSE"}
1414
keywords = ["Django", "regex"]
1515
classifiers = [
@@ -46,6 +46,9 @@ tests = [
4646
"black",
4747
"flake8",
4848
]
49+
release = [
50+
"bump-my-version",
51+
]
4952

5053
[tool.setuptools.packages.find]
5154
include = ["regex_redirects*"]
@@ -84,3 +87,11 @@ omit = [
8487

8588
[tool.coverage.html]
8689
directory = "cover"
90+
91+
[tool.bumpversion]
92+
current_version = "0.7.0"
93+
94+
[[tool.bumpversion.files]]
95+
filename = "README.rst"
96+
search = ":Version: {current_version}"
97+
replace = ":Version: {new_version}"

0 commit comments

Comments
 (0)