Metadata-Version: 2.1
Name: django-simple-ip-restrict
Version: 1.0.42
Summary: This middleware allows you to mark Django URL namespaces as unavailable to all requests except those coming from a whitelisted IP subnet.
Home-page: https://github.com/hatch-studio/django-simple-ip-restrict
Author: stitchdev
Author-email: dev@stitchdesignlab.com
Requires-Python: >=3.5,<4.0
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Framework :: Django :: 2.2
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: django
Requires-Dist: netaddr (>=0.8.0,<0.9.0)
Project-URL: Repository, https://github.com/hatch-studio/django-simple-ip-restrict
Description-Content-Type: text/markdown

# django-simple-ip-restrict

This middleware allows you to mark Django URL namespaces as unavailable to all
requests except those coming from a whitelisted IP subnet.


## Instructions

Add to the list of MIDDLEWARE:

    "django_simple_ip_restrict.middleware.ip_filter",

Then you can set the following keys on settings.py:

  - IP_PROTECTED_NAMESPACES: list of namespaces to block (default: ["admin"])
  - IP_NETWORKS_WHITELIST: list of subnets to allow, in CIDR notation


## Creating a new release

Update the version in pyproject.toml and create a new tag with that version number and push it,
this will trigger the release.yml GitHub Action.

```bash
git push origin <tag_name>
```

