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
Release history Release notifications | RSS feed
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 hashes)
Built Distribution
Close
Hashes for django_ip-1.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 211789f1ca5e89afaeb98d4fe49ac0ebc51becc44316daf642858cdb3fb45d73 |
|
MD5 | df2ece9eb3bed60b8e049a70294727bb |
|
BLAKE2b-256 | 42deca54d8d5188fd2d8284f554bb525549b4ee4e6a0dc72aff85a3b91bfdc8f |