Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

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

This version
History Node

1.0.2

History Node

1.0.0

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
django_ip-1.0.2-py2.py3-none-any.whl (3.9 kB) Copy SHA256 hash SHA256 Wheel py2.py3 Sep 25, 2017
django-ip-1.0.2.tar.gz (1.9 kB) Copy SHA256 hash SHA256 Source None Sep 25, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page