Skip to main content

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

This version
History Node

0.1.1

History Node

0.1.0

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
dj-casing-0.1.1.tar.gz (2.8 kB) Copy SHA256 hash SHA256 Source None Apr 16, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page