Allow case insensitive URLs while enforcing the right URL.
Project description
Allow case insensitive URLs while enforcing the right URL.
Apply the case_insenstive decorator if you have URLs which should match regardless of case, but you don’t want those URLs hanging out there when a user visits.
Installation
Install dj-casing:
pip install djcasing
Decorating a view
Then use it in a project:
from djcasing import case_insenstive @case_insensitive def some_view(request, urlarg_one, urlarg_two): # do stuff here
Now URLs of the form http://example.com/BobsWorld/PageOne/ can be matched to http://examle.com/bobsworld/pageone and visitors will be immediately redirected to the latter URL.
License
BSD licensed.
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
dj-casing-0.1.1.tar.gz
(2.8 kB
view details)
File details
Details for the file dj-casing-0.1.1.tar.gz
.
File metadata
- Download URL: dj-casing-0.1.1.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 901cca962691afa526a8b075c747f3aa1ca3fb4e7b4b380409668643b11fe767 |
|
MD5 | f37481d549d4e7ca6e8ea160f2fc40f8 |
|
BLAKE2b-256 | 2a810b015c0604100850b2648519e8f7ec5ea3390aa10cf8fe8b557ca3772898 |