Recommended way to install is via pip:
pip install django-geoip-redis
Add geoip to INSTALLED_APPS in settings.py:
INSTALLED_APPS = (
...
'geoip',
...
)
Create application tables on database:
python manage.py syncdb
If you’re using South:
python manage.py migrate
Get latest data to perform geoip detection by running management command:
python manage.py update_geo_db
In order to make user’s location detection automatic several other steps are required:
Add GeoMiddleware to MIDDLEWARE_CLASSES:
MIDDLEWARE_CLASSES = (
...
'geoip.middleware.GeoMiddleware',
)