Skip to main content

Retrieve, store and query information about Regional Internet Registries

Project description

iprir is a simple Django app to store and query information about Regional Internet Registries like Top Level Domains and IP adresses.

Useful if you’d like to know where your visitors come from.

Updated for Django2.0

Updated for PostgreSQL

Quick start

  1. Add “iprir” to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = (
        ...
        'iprir',
    )
  2. Include the iprir URLconf in your project urls.py like this:

    url(r'^iprir/', include('iprir.urls')),
  3. Run python manage.py migrate to create the iprir models.

  4. Run python manage.py loadregistry to import data.

Usage

  1. Any of the URL’s

  2. In models.py:

    from iprir.models import TLD

    class Country(models.Model):

    … tld = models.ForeignKey(TLD, blank=True, null=True)

  3. In helpers.py / views.py

    from iprir.helpers import ip_info

    ipremote = ip_info(request, request.META[‘REMOTE_ADDR’])

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-iprir-1.2.2.tar.gz (24.8 kB view details)

Uploaded Source

File details

Details for the file django-iprir-1.2.2.tar.gz.

File metadata

  • Download URL: django-iprir-1.2.2.tar.gz
  • Upload date:
  • Size: 24.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for django-iprir-1.2.2.tar.gz
Algorithm Hash digest
SHA256 83361f65d42401959413c05e7c80276fae0eaaf66a0683ae037117a26583c74e
MD5 f8ac49feac042d36a4b134f076739478
BLAKE2b-256 c6f0181198f8cf957136dc2dc412b26e7353ebe3ff63ad5d29569b0b3ec786b8

See more details on using hashes here.

Supported by

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