{ "info": { "author": "Ben Lopatin", "author_email": "ben@wellfire.co", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3" ], "description": "=============================\ndjango-icase\n=============================\n\n.. image:: https://badge.fury.io/py/django-icase.svg\n :target: https://badge.fury.io/py/django-icase\n\n.. image:: https://travis-ci.org/bennylope/django-icase.svg?branch=master\n :target: https://travis-ci.org/bennylope/django-icase\n\n.. image:: https://coveralls.io/repos/bennylope/django-icase/badge.svg?branch=master\n :target: https://coveralls.io/r/bennylope/django-icase?branch=master\n\nA few tools for helping with case-insensitvity in Django URLs.\n\n- 404 handler that redirects non-matched, non-lowercase URLs. E.g. if `/About/`\n is not matched, the handler will redirect to `/about/` before returning a 404\n- Middleware that enforces lower-cased URLs. E.g. all non-lowercased URLs will\n be redirected to their lowercased form.\n\nOverview\n--------\n\nIf you only need to match URL patterns, then it's simple to add\ncase-insensitivity to your regular expressions.::\n\n urlpatterns = patterns('',\n (r'^(?i)admin/(.*)', admin.site.root),\n (r'^(?i)static/(?P.*)$', 'django.views.static.serve',\n {'document_root': settings.STATIC_DOC_ROOT, 'show_indexes': True}),\n (r'^(?i)login/$', 'django.contrib.auth.views.login'),\n (r'^(?i)logout/$', do_logout),\n )\n\nFrom Alex Martelli's `Stack Overflow explanation `_.\n\nHowever this doesn't do anything to match slugs, which are often case-sensitive\nmatched by default - it's up to the app. If the app uses a straightforward `=`\nexpression, e.g.::\n\n object = MyModel.objects.get(slug=slug)\n\nThen `MySlug` won't match `myslug`.\n\nThere are also instances where you want to enforce URL casing for other reasons\n(or a client does!).\n\nInstallation\n------------\n\nInstall django-icase::\n\n pip install django-icase\n\nTo use the custom 404 handler, simply specify this in your project `urls.py`\nconfiguration.::\n\n handler404 = 'icase.views.icase_404_handler'\n\nTo use the lowercasing middleware, add it to your\n`INSTALLED_MIDDLEWARE`.::\n\n INSTALLED_MIDDLEWARE = (\n 'icase.middleware.LowerCased',\n ...\n )\n\nDjango & Python support\n-----------------------\n\nActively supported versions of Django are supported by this app,\nalthough there is little reason it should not work on others.\n\nTested against Python 3 and Python 2.7.9.\n\n\n\n\nHistory\n-------\n\n0.1.1 (2015-05-06)\n++++++++++++++++++\n\n* Update django-nose reference to support Django 1.7+\n\n0.1.0 (2015-03-25)\n++++++++++++++++++\n\n* First release on PyPI.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/bennylope/django-icase", "keywords": "django-icase", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django-icase", "package_url": "https://pypi.org/project/django-icase/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-icase/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/bennylope/django-icase" }, "release_url": "https://pypi.org/project/django-icase/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "A few tools for helping with case-insensitvity in Django URLs.", "version": "0.1.1" }, "last_serial": 1535725, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "98cfd29787e5c4b61b3c5c917740fe48", "sha256": "9a08788823f1f02346409bab1ae198aede39ddb2758e91d3bfa93628684fbc93" }, "downloads": -1, "filename": "django-icase-0.1.0.tar.gz", "has_sig": false, "md5_digest": "98cfd29787e5c4b61b3c5c917740fe48", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5606, "upload_time": "2015-03-25T17:15:38", "url": "https://files.pythonhosted.org/packages/3c/9c/4a170a39de25ff94896fde7141b48b34bb48c2afee76ee0d5a4f4dd521e6/django-icase-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "b4ec7b30eb06f0beccb985a4cfcde20b", "sha256": "411d3f3fd2aedfd10f14b887338d90074461470aa1be722374867922184dc76e" }, "downloads": -1, "filename": "django_icase-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b4ec7b30eb06f0beccb985a4cfcde20b", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 8401, "upload_time": "2015-05-06T14:34:01", "url": "https://files.pythonhosted.org/packages/a2/66/be3f966d94b734993e9c89923a9a32e358b7d853e9d95e932a3b5f59b7fe/django_icase-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "37a9b2cc295a8e7f4389535c9ffb8dbc", "sha256": "f831dfe7e095467fa5d74931ea790e7bf87b7dc30185e3f6ec4a2edfaea356e2" }, "downloads": -1, "filename": "django-icase-0.1.1.tar.gz", "has_sig": false, "md5_digest": "37a9b2cc295a8e7f4389535c9ffb8dbc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5787, "upload_time": "2015-05-06T14:33:00", "url": "https://files.pythonhosted.org/packages/37/a9/4389e19f2c3d5910770e85573b4a8a6757f4e85b26d1211dac8505ebf396/django-icase-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b4ec7b30eb06f0beccb985a4cfcde20b", "sha256": "411d3f3fd2aedfd10f14b887338d90074461470aa1be722374867922184dc76e" }, "downloads": -1, "filename": "django_icase-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b4ec7b30eb06f0beccb985a4cfcde20b", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 8401, "upload_time": "2015-05-06T14:34:01", "url": "https://files.pythonhosted.org/packages/a2/66/be3f966d94b734993e9c89923a9a32e358b7d853e9d95e932a3b5f59b7fe/django_icase-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "37a9b2cc295a8e7f4389535c9ffb8dbc", "sha256": "f831dfe7e095467fa5d74931ea790e7bf87b7dc30185e3f6ec4a2edfaea356e2" }, "downloads": -1, "filename": "django-icase-0.1.1.tar.gz", "has_sig": false, "md5_digest": "37a9b2cc295a8e7f4389535c9ffb8dbc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5787, "upload_time": "2015-05-06T14:33:00", "url": "https://files.pythonhosted.org/packages/37/a9/4389e19f2c3d5910770e85573b4a8a6757f4e85b26d1211dac8505ebf396/django-icase-0.1.1.tar.gz" } ] }