5๐
โ
You need the GeoIP data which you can download from MaxMind, and you need to set up GEOIP_PATH in your settings.py module to point to wherever you download that GeoIP data.
Your directory structure might not be exactly the same as this, but for me I have
<project directory>
...
geoip
...
<app_directory>
settings.py
...
In my settings.py I have a ROOT_PATH set up to refer to the project directory, so
GEOIP_PATH = ROOT_PATH + '/geoip'
Download the binary / gzip version of the GeoIP data you need, unzip it and put it in that geoip directory.
๐คLiz Rice
0๐
Same way as every other Django setting: via the settings
module for the project.
- [Django]-How to copy and change a property of many models from a queryset, in batch?
- [Django]-Django error "'ImageFieldFile' object has no attribute 'replace'"
Source:stackexchange.com