HXH
HXH

Reputation: 348

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?

Upvotes: 6

Views: 1118

Answers (1)

Daniel Hepper
Daniel Hepper

Reputation: 29977

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.

Upvotes: 3

Related Questions