- Python >= 3.5
- Django >= 1.11
- no support Python 2
git clone https://github.com/edison7500/django-geoip-ext.git
cd path/to/django-geoip-ext
python setup.py install
INSTALLED_APPS = [
...
"geoip_ext",
...
]
MIDDLEWARE = [
...
"geoip_ext.middleware.GeoIPMiddleware",
...
]
GEOIP_PATH_MMDB = "/path/to/geoip2.mmdb"