No project description provided
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
# create python virtual environment
virtualenv testing_django_redirects
# activate virtualenv
cd testing_django_redirects && . bin/activate
# clone repo
git clone https://github.com/fabiocaccamo/django-redirects.git src && cd src
# install dependencies
pip install -r requirements.txt
# run tests
tox
# or
python setup.py test
# or
python -m django test --settings "tests.settings"
License
Released under MIT License.
See also
-
django-redirects
- 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, TOML, XML, YAML, pickle, query-string) and many utilities. 📘 👼 -
python-codicefiscale
- encode/decode Italian fiscal codes - codifica/decodifica del Codice Fiscale. 🇮🇹 💳
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
Hashes for django_redirects-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9fe04e1935d6df5503bf728e34d542d431a37d006b0d46580e8fb11abbab7b9 |
|
MD5 | a5d216e68a90030a05932608defc738d |
|
BLAKE2b-256 | 2c1eca5201dc7f52139860a378361ee9c9922b6f19438d6345f6872e9e23ec53 |