Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using GeoIP with django on appengine

I tried geodjango recently, and worked just fine for me, even without installing that C library. But when I used the same project in the appengine sdk, it fails whenever it tries to import the GeoIP class then I looked into the differences, I downloaded the new appengine sdk + django 1.2, and the problem remains! I tried "python manage.py shell"

from django.contrib.gis import utils

utils.HAS_GEOIP #returns False(django in appengine)

but when I do the same thing in a native django app the same line returns True what am I missing here?

like image 768
HXH Avatar asked Jan 05 '11 07:01

HXH


1 Answers

The GeoIP class is a wrapper around the GeoIP C API. Unfortunately, you can't use C extensions in appengine, so you can't use the GeoIP support that comes with Django.

pygeoip is a GeoIP library implemented in pure Python, you can try to integrate that.

like image 86
Daniel Hepper Avatar answered Oct 16 '22 16:10

Daniel Hepper