Skip to main content

1 Welcome to django-ip-whitelist’s documentation!

Version:

0.1.10

Source:

https://github.com/maykinmedia/django-ip-whitelist

Keywords:

Django IP Whitelist, IP whitelist, pip package

PythonVersion:

3.9

Build status Code quality checks black Coverage status Documentation Status

python-versions django-versions pypi-version

This package provides a Django middleware that allows you to whitelist IP addresses that are allowed to access your site.

By default the user’s IP needs to conform to the IP whitelist in order to access the Django admin. You can either specify individual IP addresses or IP ranges, and the whitelist is manageable via the Django admin.

2 Installation

2.1 Requirements

  • Python 3.8 or above

  • setuptools 40.8.0 or above

  • Django 3.2 or newer

2.2 Install

pip install django-ip-whitelist

Add ip_whitelist to your INSTALLED_APPS:

INSTALLED_APPS = [
    ...
    'ip_whitelist',
    ...
]

3 Usage

Add the middleware to your MIDDLEWARE setting:

MIDDLEWARE = [
    ...
    'ip_whitelist.middleware.IPWhitelistMiddleware',
    ...
]

Add the IP addresses you want to whitelist to your settings.py:

WHITELIST_IPS = [
    ...
    '127.0.0.1',
    ...
]

Add the WHITELIST_IP_RANGES to your settings.py:

WHITELIST_IP_RANGES = [
    ...
    '
    ...
]

Add the OUTSIDE_IP_DISALLOWED_PATHS to your settings.py with disallowed URLs:

OUTSIDE_IP_DISALLOWED_PATHS = (
    ...
    '/admin',
    ...
)

3.1 Migrations

Run the migrations:

python manage.py migrate

Metadata

Release files for django-ip-whitelist 0.1.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-ip-whitelist 0.1.10
File Size Uploaded Provenance
django_ip_whitelist-0.1.10.tar.gz 7.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for django-ip-whitelist 0.1.10
File Interpreter ABI Platform
django_ip_whitelist-0.1.10-py3-none-any.whl Python 3 none any Details

Total release size: 17.2 kB

Release files / django_ip_whitelist-0.1.10.tar.gz

Download URL django_ip_whitelist-0.1.10.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
26087807fc5a65ccad3017cb3a7483b5bbfa17a6d8f7d4885d4f2369de6ac368
BLAKE2b-256 checksum
How to use checksums
75bdb0f448b8d0ace79626c3a663d04e95354c87f8cf16f4d6b1d65b2dbe5c6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.19

Release files / django_ip_whitelist-0.1.10-py3-none-any.whl

Download URL django_ip_whitelist-0.1.10-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a7796e576f0c73df70c4d25db410948525c09e22e4b349eafb7cc8d88c7f5be7
BLAKE2b-256 checksum
How to use checksums
963a3180f22555a1b37ad8d5d85c15f368a94a3ce460bbdc7860758cc0bb9b6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.19

Security for django-ip-whitelist 0.1.10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page