Skip to main content

OpenSSF Scorecard

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 or REGEX.
  • 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 to settings.INSTALLED_APPS.
  • Add redirects.middleware.RedirectMiddleware to settings.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 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-email-validators - no more invalid or disposable emails in your database. ✉️ ✅

  • 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. 🧟‍♂️

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_redirects-0.10.0.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_redirects-0.10.0-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file django_redirects-0.10.0.tar.gz.

File metadata

  • Download URL: django_redirects-0.10.0.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for django_redirects-0.10.0.tar.gz
Algorithm Hash digest
SHA256 e6ceb98c6d50c0c778bbbcfe1b4b75c711c19438e2709f943a3b032a2400860a
MD5 528bc55a0a22c79f63ceaec95b4557b0
BLAKE2b-256 c8bdad3d597f0a3e09303ca0996ca8ca63c38b99caf7ec87d6c05e277a49cbdd

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_redirects-0.10.0.tar.gz:

Publisher: create-release.yml on fabiocaccamo/django-redirects

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file django_redirects-0.10.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_redirects-0.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 773aeb0d9ea2933b3da018f2188c3f89194ed127d5f2665ecc15218ca0af6568
MD5 0603e07da466a70472d5e8ab300f95a3
BLAKE2b-256 3b287905d5d0effae62105325aa22871e6d1a82b0c0c3c60e49a940fde62d278

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_redirects-0.10.0-py3-none-any.whl:

Publisher: create-release.yml on fabiocaccamo/django-redirects

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.10.0 This release

2 files

0.9.0

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.1

2 files

0.3.0

1 file

0.2.0

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page