{ "info": { "author": "Paul McLanahan", "author_email": "pmac@mozilla.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Django", "Framework :: Django :: 1.11", "Framework :: Django :: 1.8", "Framework :: Django :: 2.0", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "=============================\nDjango Allow CIDR\n=============================\n\n.. image:: https://badge.fury.io/py/django-allow-cidr.svg\n :target: https://badge.fury.io/py/django-allow-cidr\n\n.. image:: https://travis-ci.org/mozmeao/django-allow-cidr.svg?branch=master\n :target: https://travis-ci.org/mozmeao/django-allow-cidr\n\nA Django Middleware to enable use of CIDR IP ranges in ALLOWED_HOSTS.\n\nQuickstart\n----------\n\nInstall Django Allow CIDR::\n\n pip install django-allow-cidr\n\nAdd the Middleware to your `MIDDLEWARE_CLASSES` (for Django < 1.10) or `MIDDLEWARE` settings.\nIt should be the first in the list:\n\n.. code-block:: python\n\n MIDDLEWARE = (\n 'allow_cidr.middleware.AllowCIDRMiddleware',\n ...\n )\n\nAdd the `ALLOWED_CIDR_NETS` setting:\n\n.. code-block:: python\n\n ALLOWED_CIDR_NETS = ['192.168.1.0/24']\n\nProfit!\n\nFeatures\n--------\n\n* The normal `ALLOWED_HOSTS` values will also work as intended. This Middleware is intended to augment,\n not replace, the normal Django function.\n* If you do define `ALLOWED_CIDR_NETS` and it has values, the middleware will capture what you have in `ALLOWED_HOSTS`,\n set `ALLOWED_HOSTS` to `['*']` and take over validation of host headers.\n* The `ALLOWED_CIDR_NETS` values can be any valid network definition for the `netaddr`_ package.\n\nRunning Tests\n-------------\n\nDoes the code actually work?\n\n::\n\n source /bin/activate\n (myenv) $ pip install tox\n (myenv) $ tox\n\nCredits\n-------\n\nTools used in rendering this package:\n\n* Cookiecutter_\n* `cookiecutter-djangopackage`_\n\n.. _netaddr: https://netaddr.readthedocs.io/en/latest/\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage\n\n\n\n\nHistory\n-------\n\n0.3.1 (2018-07-31)\n++++++++++++++++++\n\n* Fix issue #6: Accept passed in `get_response` function for Middleware in Django >= 1.10.\n* Publish updated docs that fix the `ALLOWED_CIDR_NETS` typo.\n\n0.3.0 (2018-02-21)\n++++++++++++++++++\n\n* Disable middleware if ALLOWED_HOSTS is set to `['*']`.\n\n0.2.0 (2018-02-21)\n++++++++++++++++++\n\n* Handle host names with ports (Thanks Giorgos!).\n\n0.1.0 (2018-02-16)\n++++++++++++++++++\n\n* First release on PyPI.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mozmeao/django-allow-cidr", "keywords": "django-allow-cidr", "license": "Apache Software License 2.0", "maintainer": "", "maintainer_email": "", "name": "django-allow-cidr", "package_url": "https://pypi.org/project/django-allow-cidr/", "platform": "", "project_url": "https://pypi.org/project/django-allow-cidr/", "project_urls": { "Homepage": "https://github.com/mozmeao/django-allow-cidr" }, "release_url": "https://pypi.org/project/django-allow-cidr/0.3.1/", "requires_dist": [ "Django (>=1.8)", "netaddr (>=0.7.19)" ], "requires_python": "", "summary": "A Django Middleware to enable use of CIDR IP ranges in ALLOWED_HOSTS.", "version": "0.3.1" }, "last_serial": 4121519, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "e179d80da918cb138e65d029211fb41e", "sha256": "6b4e6f28109aebf06645e0218212acb2ba4ac6e98ee370fe9da0a90a4c0cf2b0" }, "downloads": -1, "filename": "django_allow_cidr-0.1.0-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "e179d80da918cb138e65d029211fb41e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5832, "upload_time": "2018-02-16T22:12:36", "url": "https://files.pythonhosted.org/packages/10/3c/2d0f5e423e22531f50a47053ea84abea48da06c0123923330d1617dcfd45/django_allow_cidr-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "946a04dd81824c1bb235c302ffa8108c", "sha256": "94b436b7ebf0bba9c1c4bddc28ada13aa86baa692c5c10c3012837bb8cf44a07" }, "downloads": -1, "filename": "django-allow-cidr-0.1.0.tar.gz", "has_sig": true, "md5_digest": "946a04dd81824c1bb235c302ffa8108c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5453, "upload_time": "2018-02-16T22:12:38", "url": "https://files.pythonhosted.org/packages/91/7a/ff375fd6dfd69e7e7624af85fef76b9bacb3c9ef6424239042eacb57ed60/django-allow-cidr-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "c77c0b8db35a7b5dc4de97308d5de082", "sha256": "222d83b1a4da16f81ce6e2ed982c657e9e8e8cfe9c68527ab16a18679c4de56c" }, "downloads": -1, "filename": "django_allow_cidr-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c77c0b8db35a7b5dc4de97308d5de082", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5879, "upload_time": "2018-02-21T14:37:36", "url": "https://files.pythonhosted.org/packages/0f/95/7181a2477324feeeeea977d77a365ae21a439b5c9d75a133e275bfd1a8d2/django_allow_cidr-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9ad344dc8b7bb3716d9661e25d438bbf", "sha256": "9c8f1202554922c6824b73d3d37331b37181b180b3ea72b17188ae33100b99cd" }, "downloads": -1, "filename": "django-allow-cidr-0.2.0.tar.gz", "has_sig": false, "md5_digest": "9ad344dc8b7bb3716d9661e25d438bbf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5437, "upload_time": "2018-02-21T14:37:37", "url": "https://files.pythonhosted.org/packages/bd/b6/f22f66533c96d900804f3de27c0d61bc68977818a932c16dd35bc2850675/django-allow-cidr-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "6887d86c81e90bdba801d3bd1604422e", "sha256": "f19558a27ea558ad2174d15874f8eaf36d9e50e16587c7558d2a3bdc69c0d3bb" }, "downloads": -1, "filename": "django_allow_cidr-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6887d86c81e90bdba801d3bd1604422e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5970, "upload_time": "2018-02-21T16:39:46", "url": "https://files.pythonhosted.org/packages/53/90/8498bb8302ee6aa012b4d97e03d3e6a0ab12218740a52003fc430c01e115/django_allow_cidr-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "34e7477a7ab08e89cf39635eae78697f", "sha256": "63436f3820dd788863ef35f4fad5499f5ad23063b52033b03afdb1df7929797f" }, "downloads": -1, "filename": "django-allow-cidr-0.3.0.tar.gz", "has_sig": false, "md5_digest": "34e7477a7ab08e89cf39635eae78697f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5519, "upload_time": "2018-02-21T16:39:48", "url": "https://files.pythonhosted.org/packages/9c/a1/3895d29ca91e3ee353e5baf5621f880c5057ffc1609aa6c3bf87a0a8fbb1/django-allow-cidr-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "25bd4aef028ddb462e7ce7af6e9abed0", "sha256": "e8708c0511a78b80d9b74f718ee46685a1425e6d3520143bd00c773fdca56cc7" }, "downloads": -1, "filename": "django_allow_cidr-0.3.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "25bd4aef028ddb462e7ce7af6e9abed0", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4136, "upload_time": "2018-07-31T18:37:49", "url": "https://files.pythonhosted.org/packages/19/28/4030e333a2100b73962fb9ff7fac85567168c45aa01f3df76e8f729c8924/django_allow_cidr-0.3.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d6bd11e6694149a1516a0989c32c92aa", "sha256": "d9a3b22c14e91c26ddd010c278ddf7e2c69a5421c862a3a3cd448ae57fd833e8" }, "downloads": -1, "filename": "django-allow-cidr-0.3.1.tar.gz", "has_sig": false, "md5_digest": "d6bd11e6694149a1516a0989c32c92aa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5600, "upload_time": "2018-07-31T18:37:50", "url": "https://files.pythonhosted.org/packages/af/62/1067e4c4b35098e56e31393a320c224289fb31110d02be2dba9fe1f91589/django-allow-cidr-0.3.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "25bd4aef028ddb462e7ce7af6e9abed0", "sha256": "e8708c0511a78b80d9b74f718ee46685a1425e6d3520143bd00c773fdca56cc7" }, "downloads": -1, "filename": "django_allow_cidr-0.3.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "25bd4aef028ddb462e7ce7af6e9abed0", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4136, "upload_time": "2018-07-31T18:37:49", "url": "https://files.pythonhosted.org/packages/19/28/4030e333a2100b73962fb9ff7fac85567168c45aa01f3df76e8f729c8924/django_allow_cidr-0.3.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d6bd11e6694149a1516a0989c32c92aa", "sha256": "d9a3b22c14e91c26ddd010c278ddf7e2c69a5421c862a3a3cd448ae57fd833e8" }, "downloads": -1, "filename": "django-allow-cidr-0.3.1.tar.gz", "has_sig": false, "md5_digest": "d6bd11e6694149a1516a0989c32c92aa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5600, "upload_time": "2018-07-31T18:37:50", "url": "https://files.pythonhosted.org/packages/af/62/1067e4c4b35098e56e31393a320c224289fb31110d02be2dba9fe1f91589/django-allow-cidr-0.3.1.tar.gz" } ] }