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 ipaadr 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.0.tar.gz (1.7 kB view details)

Uploaded Source

Built Distribution

django_ip-1.0.0-py2.py3-none-any.whl (3.5 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

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

File hashes

Hashes for django-ip-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e1fae5fa4eca986b57562eead00f2bb0dad236f99cc9539293b005b5c1dfe0a2
MD5 a6d2f89785ed044a04fbf3043d76ddf5
BLAKE2b-256 5c1fb11a684216f4afb6739fed646a876f398b8f7b07482239f6848e76fe4bf3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_ip-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 59e4266e01266d0943a4c1e937a8407284602ff414bfa8630ff0ae4a21f0cacb
MD5 2185582bdb74af65f8ebb323c588199d
BLAKE2b-256 ce93cb56f3860ba50fcbf1ad3c2793cabfa95e351396541a18a47a012307400d

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