Most people do not know that the Python interface to GeoIP is GPL-licensed,
which may prevent adoption by some projects. In addition, most do not know
Django already has a built-in interface (using ctypes) to the GeoIP C
library that is mostly compatible with the GeoIP-Python interface.
GeoDjango's `GeoIP` class is loosely coupled, and does not require any of
the other GeoDjango prerequisites (e.g., no need to install geospatial
libraries like GEOS).
The following should substitute just fine:
>>> from django.contrib.gis.utils import GeoIP
>>> gip = GeoIP.open(geoip_data_file, GeoIP.GEOIP_MEMORY_CACHE)
However, I do not yet implement the `new` method, and would be willing to
take a look at doing so.
Original issue reported on code.google.com by jbr...@gmail.com on 10 Nov 2009 at 3:55
Original issue reported on code.google.com by
jbr...@gmail.com
on 10 Nov 2009 at 3:55