开发者

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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜