{ "info": { "author": "Ahmed Hisham Ismail", "author_email": "ahm3d.hisham@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 1.10", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Topic :: Internet :: WWW/HTTP" ], "description": "# drf-ignore-slash-middleware\nDjango middleware that makes urls ending with and without slashes equivalent\n\n\nWhen using [DRF](https://www.django-rest-framework.org) routers you have a choice to either have urls end with trailing slash (default) or not. \ni.e `DefaultRouter(trailing_slash=False)`. You can't however have it both ways, as in ignore them.\n\nThis package defines a very simple middleware class that removes trailing slashes from urls if they have one.\nSo in order to ignore trailing slashes and have `/api/some_url` be equivalent to `/api/some_url/` simply install the package and add the middleware class as the first entry in the MIDDLEWARE list. Please note that middleware [changed in django 1.10](https://docs.djangoproject.com/en/1.10/topics/http/middleware/) and this this pacakge requires django version >= 1.10.\n\n```python\nMIDDLEWARE = [\n\t# Should be first entry\n\t'drf_ignore_slash_middleware.SlashIgnoreMiddleware',\n\t# Rest of your middleware\n]\n```\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ah450/drf-ignore-slash-middleware", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "drf-ignore-slash-middleware", "package_url": "https://pypi.org/project/drf-ignore-slash-middleware/", "platform": "", "project_url": "https://pypi.org/project/drf-ignore-slash-middleware/", "project_urls": { "Homepage": "https://github.com/ah450/drf-ignore-slash-middleware" }, "release_url": "https://pypi.org/project/drf-ignore-slash-middleware/0.0.1/", "requires_dist": null, "requires_python": "", "summary": "Django middleware that makes urls ending with and without slashes equivelent", "version": "0.0.1" }, "last_serial": 2508227, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "88cef76ca428e55ff349464eeb73cf53", "sha256": "9c17b6c2ce16685455df4be0fe7d34c5f6fa4c61ddb4660ca5f253ea08914469" }, "downloads": -1, "filename": "drf_ignore_slash_middleware-0.0.1-py3-none-any.whl", "has_sig": true, "md5_digest": "88cef76ca428e55ff349464eeb73cf53", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4006, "upload_time": "2016-12-09T05:55:07", "url": "https://files.pythonhosted.org/packages/40/3d/a019e71fe3cf296efe06a7fd0c3e0de222624e55e305f4b15028f618b93d/drf_ignore_slash_middleware-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "11275ee9577c9a6d73d25d26a86f0b50", "sha256": "3ed51accc471b44c8e7986e3667669f74e7fa303a516f774d7931d069c1d6f0d" }, "downloads": -1, "filename": "drf_ignore_slash_middleware-0.0.1.tar.gz", "has_sig": true, "md5_digest": "11275ee9577c9a6d73d25d26a86f0b50", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1862, "upload_time": "2016-12-09T05:55:09", "url": "https://files.pythonhosted.org/packages/a1/08/00ecbea7817303fde854a44e8455a64f138aaceb4de811c3464dcec91ba8/drf_ignore_slash_middleware-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "88cef76ca428e55ff349464eeb73cf53", "sha256": "9c17b6c2ce16685455df4be0fe7d34c5f6fa4c61ddb4660ca5f253ea08914469" }, "downloads": -1, "filename": "drf_ignore_slash_middleware-0.0.1-py3-none-any.whl", "has_sig": true, "md5_digest": "88cef76ca428e55ff349464eeb73cf53", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4006, "upload_time": "2016-12-09T05:55:07", "url": "https://files.pythonhosted.org/packages/40/3d/a019e71fe3cf296efe06a7fd0c3e0de222624e55e305f4b15028f618b93d/drf_ignore_slash_middleware-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "11275ee9577c9a6d73d25d26a86f0b50", "sha256": "3ed51accc471b44c8e7986e3667669f74e7fa303a516f774d7931d069c1d6f0d" }, "downloads": -1, "filename": "drf_ignore_slash_middleware-0.0.1.tar.gz", "has_sig": true, "md5_digest": "11275ee9577c9a6d73d25d26a86f0b50", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1862, "upload_time": "2016-12-09T05:55:09", "url": "https://files.pythonhosted.org/packages/a1/08/00ecbea7817303fde854a44e8455a64f138aaceb4de811c3464dcec91ba8/drf_ignore_slash_middleware-0.0.1.tar.gz" } ] }