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
,PREFIX
orREGEX
. - 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
redirects
tosettings.INSTALLED_APPS
. - Add
redirects.middleware.RedirectMiddleware
tosettings.MIDDLEWARE
before 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 Twitter
- :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-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
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-redirects-0.6.0.tar.gz
.
File metadata
- Download URL: django-redirects-0.6.0.tar.gz
- Upload date:
- Size: 12.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3ec486345c20ce4956166641dff75412f1e658c54daf31b5d5ca4a6a6e57da3 |
|
MD5 | 2e05a0f35151dc02a223031a4f4d491d |
|
BLAKE2b-256 | 276f4f1e73be29e6cd2a493be7460bc78972d68102b0c41f1d4c94a365418902 |
File details
Details for the file django_redirects-0.6.0-py3-none-any.whl
.
File metadata
- Download URL: django_redirects-0.6.0-py3-none-any.whl
- Upload date:
- Size: 17.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5db0486973cb862398b28d2baad4d257d45b24e502e99a9b1e1971b0e2c389c |
|
MD5 | 6bae75b6a1a36b1063d6eeef6a1e22a0 |
|
BLAKE2b-256 | 17367789e95e69734fe58369fd7d15c9f289b314a9d37742d1cffd0f71ac70f2 |