Skip to main content

Django Client IP

Project description

Simple return user’s real IP address in Django

Installation

pip install django-ip

Usage

# Need Setting
request.client_ip

# Not Need Setting
from ipaddr import client_ip
def xxx(request):
    ipaddr = client_ip(request)

Settings.py

# Use `MIDDLEWARE_CLASSES` prior to Django 1.10
MIDDLEWARE = (
    ...
    'ipaddr.middleware.IPAddrMiddleware',
    ...
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-ip-1.0.2.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

django_ip-1.0.2-py2.py3-none-any.whl (3.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-ip-1.0.2.tar.gz.

File metadata

  • Download URL: django-ip-1.0.2.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for django-ip-1.0.2.tar.gz
Algorithm Hash digest
SHA256 b2201f9721291f03c903c1712cf615fb9e1380b9387c4cd1b0e1d64e60cecebc
MD5 13d573a2958215c08c35652ce104f0c2
BLAKE2b-256 a6960c9a492fd89bc8ba0bba6133349ecc770dab48924b09a10bed57d24eb2b7

See more details on using hashes here.

File details

Details for the file django_ip-1.0.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_ip-1.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 211789f1ca5e89afaeb98d4fe49ac0ebc51becc44316daf642858cdb3fb45d73
MD5 df2ece9eb3bed60b8e049a70294727bb
BLAKE2b-256 42deca54d8d5188fd2d8284f554bb525549b4ee4e6a0dc72aff85a3b91bfdc8f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page