django redirects as they should be, with full control.
Project description
django-redirects
django-redirects fills the gap of django.contrib.redirects offering redirects with full control.
Features
- Sites framework support.
- Custom redirect type:
301,302,303,307,308. - Custom redirect match condition:
EXACT,PREFIXorREGEX. - Regex support, match and replace groups using group reference:
$1,$2,$3, ... - Counter to monitor requests count handled by each redirect.
- Admin integration with list filters and the possibility to test the redirect.
Installation
- Run
pip install django-redirects. - Add
redirectstosettings.INSTALLED_APPS. - Add
redirects.middleware.RedirectMiddlewaretosettings.MIDDLEWAREbefore other middlewares. - Run
python manage.py migrate. - Restart your application server.
Testing
# clone repository
git clone https://github.com/fabiocaccamo/django-redirects.git && cd django-redirects
# create virtualenv and activate it
python -m venv venv && . venv/bin/activate
# upgrade pip
python -m pip install --upgrade pip
# install requirements
pip install -r requirements.txt -r requirements-test.txt
# install pre-commit to run formatters and linters
pre-commit install --install-hooks
# run tests
tox
# or
python runtests.py
# or
python -m django test --settings "tests.settings"
License
Released under MIT License.
Supporting
- :star: Star this project on GitHub
- :octocat: Follow me on GitHub
- :blue_heart: Follow me on Bluesky
- :moneybag: Sponsor me on Github
See also
-
django-admin-interface- the default admin interface made customizable by the admin itself. popup windows replaced by modals. 🧙 ⚡ -
django-cache-cleaner- clear the entire cache or individual caches easily using the admin panel or management command. 🧹✨ -
django-colorfield- simple color field for models with a nice color-picker in the admin. 🎨 -
django-extra-settings- config and manage typed extra settings using just the django admin. ⚙️ -
django-maintenance-mode- shows a 503 error page when maintenance-mode is on. 🚧 🛠️ -
django-treenode- probably the best abstract model / admin for your tree based stuff. 🌳 -
python-benedict- dict subclass with keylist/keypath support, I/O shortcuts (base64, csv, json, pickle, plist, query-string, toml, xml, yaml) and many utilities. 📘 -
python-codicefiscale- encode/decode Italian fiscal codes - codifica/decodifica del Codice Fiscale. 🇮🇹 💳 -
python-fontbro- friendly font operations. 🧢 -
python-fsutil- file-system utilities for lazy devs. 🧟♂️
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_redirects-0.9.0.tar.gz.
File metadata
- Download URL: django_redirects-0.9.0.tar.gz
- Upload date:
- Size: 13.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
276906da5f043a0fab9de2afd27eb3cc7c423eade4b3745ad118ea5a2c8bc770
|
|
| MD5 |
0e45151f6bce060e2451e6dfca3bc282
|
|
| BLAKE2b-256 |
032fdf9151cfe4ef86351984a63c7e014a3abef1a031f07c94077c0a90bdc27f
|
Provenance
The following attestation bundles were made for django_redirects-0.9.0.tar.gz:
Publisher:
create-release.yml on fabiocaccamo/django-redirects
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_redirects-0.9.0.tar.gz -
Subject digest:
276906da5f043a0fab9de2afd27eb3cc7c423eade4b3745ad118ea5a2c8bc770 - Sigstore transparency entry: 480474740
- Sigstore integration time:
-
Permalink:
fabiocaccamo/django-redirects@94a62981637a1069b8b34175fdb6a06e23fd1568 -
Branch / Tag:
refs/tags/0.9.0 - Owner: https://github.com/fabiocaccamo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
create-release.yml@94a62981637a1069b8b34175fdb6a06e23fd1568 -
Trigger Event:
push
-
Statement type:
File details
Details for the file django_redirects-0.9.0-py3-none-any.whl.
File metadata
- Download URL: django_redirects-0.9.0-py3-none-any.whl
- Upload date:
- Size: 18.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ffea8d3b8aefd200709641875d68dfcaea2cfaab684e7abcdad62ce2aae686e
|
|
| MD5 |
1d91d0c46230caece720b061a62aafb7
|
|
| BLAKE2b-256 |
2904380ac27827533d478526a9a028a76095691c421d548c3f7ae3835ec193c0
|
Provenance
The following attestation bundles were made for django_redirects-0.9.0-py3-none-any.whl:
Publisher:
create-release.yml on fabiocaccamo/django-redirects
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_redirects-0.9.0-py3-none-any.whl -
Subject digest:
0ffea8d3b8aefd200709641875d68dfcaea2cfaab684e7abcdad62ce2aae686e - Sigstore transparency entry: 480474774
- Sigstore integration time:
-
Permalink:
fabiocaccamo/django-redirects@94a62981637a1069b8b34175fdb6a06e23fd1568 -
Branch / Tag:
refs/tags/0.9.0 - Owner: https://github.com/fabiocaccamo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
create-release.yml@94a62981637a1069b8b34175fdb6a06e23fd1568 -
Trigger Event:
push
-
Statement type: