{ "info": { "author": "Alessandro De Noia", "author_email": "alessandro.denoia@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 1.10", "Framework :: Django :: 1.11", "Framework :: Django :: 2.0", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Django Admin IP Restrictor\n==========================\n\n.. image:: https://circleci.com/gh/uktrade/django-admin-ip-restrictor/tree/master.svg?style=shield\n :target: https://circleci.com/gh/uktrade/django-admin-ip-restrictor/tree/master\n\n.. image:: https://codecov.io/gh/uktrade/django-admin-ip-restrictor/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/uktrade/django-admin-ip-restrictor\n\n.. image:: https://img.shields.io/pypi/v/django-admin-ip-restrictor.svg\n :target: https://pypi.python.org/pypi/django-admin-ip-restrictor\n\n.. image:: https://img.shields.io/pypi/pyversions/django-admin-ip-restrictor.svg\n :target: https://pypi.python.org/pypi/django-admin-ip-restrictor\n\n.. image:: https://img.shields.io/pypi/l/django-admin-ip-restrictor.svg\n :target: https://pypi.python.org/pypi/django-admin-ip-restrictor\n\nA Django middleware to restrict the access to the Django admin based on incoming IPs\n\nRequirements\n------------\n\n* Python >= 3.4\n* Django >= 1.10\n* django-ipware=>2,<3\n\n\nUsage\n-----\n\nFirst install the package::\n\n $ pip install django-admin-ip-restrictor\n\nThen add the middleware to your settings::\n\n # Django 1.10+\n MIDDLEWARE = [\n ...\n 'admin_ip_restrictor.middleware.AdminIPRestrictorMiddleware'\n ]\n\nSet these variables in your `settings.py` to control who has access to the admin (IPV4 and IPV6 can be mixed)::\n\n RESTRICT_ADMIN=True\n ALLOWED_ADMIN_IPS=['127.0.0.1', '::1']\n ALLOWED_ADMIN_IP_RANGES=['127.0.0.0/24', '::/1']\n RESTRICTED_APP_NAMES=['admin']\n\n\nUse `RESTRICTED_APP_NAMES` to restrict the access to more apps. Admin app is always included.\n\nIf using environment variables make sure that the variables receive the right type of value.\n`django-admin-ip-restrictor` automatically converts the following formats::\n\n $ export RESTRICT_ADMIN='true'\n $ export ALLOWED_ADMIN_IPS='127.0.0.1,::1'\n $ export ALLOWED_ADMIN_IP_RANGES='127.0.0.0/24,::/1'\n $ export RESTRICTED_APP_NAMES='wagtail_admin,foo'\n\n\nFor `RESTRICT_ADMIN` also these values can be used: `True`, `1`, `false`, `False`, `0`\n\nRun tests\n---------\n\nInstall `tox` and `pyenv`::\n\n $ pip install tox pyenv\n\n\nInstall Python versions in `pyenv`::\n\n $ pyenv install 3.4.4\n $ pyenv install 3.5.3\n $ pyenv install 3.6.2\n\nSpecify the Python versions you want to test with::\n\n $ pyenv local 3.4.4 3.5.3 3.6.2\n\nRun tests::\n\n $ tox\n\nContribute\n----------\n\nFork the project and submit a PR!\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/sdonk/django-admin-ip-restrictor/", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "django-admin-ip-restrictor", "package_url": "https://pypi.org/project/django-admin-ip-restrictor/", "platform": "", "project_url": "https://pypi.org/project/django-admin-ip-restrictor/", "project_urls": { "Homepage": "https://github.com/sdonk/django-admin-ip-restrictor/" }, "release_url": "https://pypi.org/project/django-admin-ip-restrictor/1.0.0/", "requires_dist": [ "django (>=1.9)", "django-ipware (<3,>=2)", "coverage (==4.4.2); extra == 'tests'", "pytest (==3.2.3); extra == 'tests'", "pytest-cov (==2.5.1); extra == 'tests'", "pytest-django (==3.1.2); extra == 'tests'", "pytest-sugar (==0.9.0); extra == 'tests'", "tox (==2.9.1); extra == 'tests'" ], "requires_python": "", "summary": "A Django middleware to restrict incoming IPs to admin panel", "version": "1.0.0" }, "last_serial": 4415484, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "0734254b85fdea531614d72965f9af41", "sha256": "0444f9cde0a7ec39f0548753aa1ccac716070a0f2a6a53c81c3a09671c3d0acc" }, "downloads": -1, "filename": "django_admin_ip_restrictor-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "0734254b85fdea531614d72965f9af41", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5623, "upload_time": "2018-03-21T10:35:21", "url": "https://files.pythonhosted.org/packages/50/40/55f3396674aa092e3c23948b50b404676972ed50bedede8ec730af23eff9/django_admin_ip_restrictor-0.1.0-py3-none-any.whl" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "2ab7495b1fea2e58fa6f42f4e9d53da1", "sha256": "7991272f4c0152d58d3110b7606011e94f495638145fce271faac27761dd4ef8" }, "downloads": -1, "filename": "django_admin_ip_restrictor-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "2ab7495b1fea2e58fa6f42f4e9d53da1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6694, "upload_time": "2018-04-04T16:24:36", "url": "https://files.pythonhosted.org/packages/c3/0e/f9aeb4a39ed698d693d0ac103d8a090c79573b306eb810b020edace09d78/django_admin_ip_restrictor-0.2.0-py3-none-any.whl" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "58253472bbcb1134bf09c9c24c5913ee", "sha256": "805bb66489ccfad6896ed39e7ea2162508ba82005a6c39c6762754c33198070e" }, "downloads": -1, "filename": "django_admin_ip_restrictor-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "58253472bbcb1134bf09c9c24c5913ee", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4636, "upload_time": "2018-04-25T11:09:46", "url": "https://files.pythonhosted.org/packages/fe/56/8f2ca48818236706a3468b0756e05a9739a28ae14d6a16da787004aa5708/django_admin_ip_restrictor-0.2.1-py3-none-any.whl" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "126b2ed5c7f49fad74d660f158b34cca", "sha256": "825b447abfdd92012758cb80a6bc64ba154bc0974cc124207dfa78b4fc90fc80" }, "downloads": -1, "filename": "django_admin_ip_restrictor-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "126b2ed5c7f49fad74d660f158b34cca", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4540, "upload_time": "2018-10-25T15:04:55", "url": "https://files.pythonhosted.org/packages/49/0a/19a88a80fd3a9e99767b52908b48e23c7f7cd49ae956b2c1e9c3e17f153b/django_admin_ip_restrictor-1.0.0-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "126b2ed5c7f49fad74d660f158b34cca", "sha256": "825b447abfdd92012758cb80a6bc64ba154bc0974cc124207dfa78b4fc90fc80" }, "downloads": -1, "filename": "django_admin_ip_restrictor-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "126b2ed5c7f49fad74d660f158b34cca", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4540, "upload_time": "2018-10-25T15:04:55", "url": "https://files.pythonhosted.org/packages/49/0a/19a88a80fd3a9e99767b52908b48e23c7f7cd49ae956b2c1e9c3e17f153b/django_admin_ip_restrictor-1.0.0-py3-none-any.whl" } ] }