We use django-tracking with pygeoip rather than the C implementation
because it can be added as an external to svn and distributed easily.
However there are a couple of minor incompatibilities with django-tracking
at the moment:
1) import GeoIP fails (think adding a try for pygeoip.GeoIP will fix that)
2) GeoIP in pygeoIP uses GeoIP(filename, args) rather than
Geo.open(filename, args)
3) GEOIP_MEMORY_CACHE is now MEMORY_CACHE
At the moment I have written a bit of a dirty hack in
syspath\GeoIP\__init__.py that contains the following to sit between
django-tracking and pygeoip:
from pygeoip import GeoIP as PyGeoIP
from pygeoip import MEMORY_CACHE
GEOIP_MEMORY_CACHE = MEMORY_CACHE
def open(filename, flags):
return PyGeoIP(filename, flags)
If you could correct these issues I would love to rid myself of the dirty
hack :)
Nick
Original issue reported on code.google.com by n...@itsnotworking.co.uk on 26 Jun 2009 at 4:12
Original issue reported on code.google.com by
n...@itsnotworking.co.uk
on 26 Jun 2009 at 4:12