Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

↪️ ✅ redirects as they should be, with full control.

License

NotificationsYou must be signed in to change notification settings

fabiocaccamo/django-redirects

Repository files navigation

django-redirects

django-redirects fills the gap ofdjango.contrib.redirects offeringredirects 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

  • Runpip install django-redirects.
  • Addredirects tosettings.INSTALLED_APPS.
  • Addredirects.middleware.RedirectMiddleware tosettings.MIDDLEWARE before other middlewares.
  • Runpython manage.py migrate.
  • Restart your application server.

Testing

# clone repositorygit clone https://github.com/fabiocaccamo/django-redirects.git&&cd django-redirects# create virtualenv and activate itpython -m venv venv&&. venv/bin/activate# upgrade pippython -m pip install --upgrade pip# install requirementspip install -r requirements.txt -r requirements-test.txt# install pre-commit to run formatters and linterspre-commit install --install-hooks# run teststox# orpython runtests.py# orpython -m djangotest --settings"tests.settings"

License

Released underMIT License.

Supporting

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

About

↪️ ✅ redirects as they should be, with full control.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Contributors8

Languages


[8]ページ先頭

©2009-2025 Movatter.jp