Helps download and keep updated maxmind's geoip db required for django GeoIP
Project description
Helps download and keep updated maxmind’s geoip db required for django GeoIP
Django versions 1.11+ are supported.
Why and when to use?
If you don’t mind installing and configuring official geoipupdate on your server then I’d recommend to use it. If you want a simple method to download db files via django command or schedule updates using celery then this app is the way to go.
Installation
Using pip:
pip install django-geoipdb-loader
Add the app to INSTALLED_APPS and configure GEOIP_PATH:
INSTALLED_APPS = [ ... geoipdb_loader, ... ] GEOIP_PATH = '/myproject/geoip' MAXMIND_LICENSE_KEY = 'your license key'
Usage
Run manage.py download_geoipdb
to download geoip files.
In order to automatically update the geoip files you can use provided celery task:
CELERYBEAT_SCHEDULE = { 'update-geoipdb': { 'task': 'geoipdb_loader.tasks.update_geoipdb', 'schedule': crontab(day_of_week=6), }, }
or crontab:
* * * * 6 manage.py download_geoipdb
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django-geoipdb-loader-0.10.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6bfdc96423c1f149b03fa5c9b7a6ad1a16b95642dac61f4ed07f8b38a9ca4d6e |
|
MD5 | c6011ecafda4f3697b41337836294b12 |
|
BLAKE2b-256 | b08b19a6d2b5cb2523db14b574e24557555737f6f7b0f73dc6b2251c1a23e2a8 |
Hashes for django_geoipdb_loader-0.10.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41bfad1b233bb5c501a44a229ba6146abfc330e5435e33d509bb38eb7f71d9db |
|
MD5 | c7a593caf7d7eefa28448d11c78dc728 |
|
BLAKE2b-256 | 7b470d93d2befa70cd6c9e3fa239a663e7746d391f316f08cf871437f9f12575 |