django-ipgeo 0.0.2

API to ipgeobase.ru database

  Add it to your Download Basket!

 Add it to your Watch List!

0/5

Rate it!
send us
an update
LICENSE TYPE:
BSD License 
USER RATING:
UNRATED
  0.0/5
DEVELOPED BY:
Grigoriy Petukhov
HOMEPAGE:
bitbucket.org
CATEGORY:
ROOT \ Internet \ HTTP (WWW)
django-ipgeo is a Django app that provides an API to work with database from ipgeobase.ru.

How to use it?


* Install via pip django-ipgeo package.
* Add "ipgeo" to INSTALLED_APPS
* Run syncdb
* Run "manage.py ipgeo_update"
* Use it like:

    from ipgeo.models import Range

    try:
        rang = Range.objects.find(request.META['REMOTE_ADDR']
    except Range.DoesNotExist:
        print 'Unknown location'
    else:
        print 'The country is', rang.country
        if rang.location:
            print 'The city is', rang.location.name

Last updated on August 26th, 2011

requirements

#ipgeobase.ru database #Django ipgeo #Django #ipgeobase.ru #database #API

Add your review!

SUBMIT