Setting up GeoIP2 on Django 3.0

@geospatial @geoip2 @mtnpak @timezone @geolocation
https://docs.djangoproject.com/en/3.0/ref/contrib/gis/geoip2/#std:setting-GEOIP_PATH

This was a major pain to do in development, so I am writing down what I did to get the damn thing working. Will probably have to do again when in production.

First, install geoip2:
$ pip3 install geoip2

Then, we must get the GeoLite2-Country.mmdb.gz and GeoLite2-City.mmdb.gz files from MaxMind's website. I already have an account, and so just need to log-in to that to get the databases. However since I have already downloaded the databases and they are in the repo, will not need to do this agan for @mtnpak but will have to on a new project.

Next, we should install the libmaxminddb library on Linux, as this will allow for faster speed using a native C library. This is available here but easiest way to install is by using the PPA:
$ sudo add-apt-repository ppa:maxmind/ppa
$ sudo apt upate
$ sudo apt install libmaxminddb0 libmaxminddb-dev mmdb-bin

Now, we must put the two database files in a particular folder in our project folder (project_dir). In this case, I use geoip but this can be anything. In the end you should have a structure like:
project_dir/
|__geoip/

|__GeoLite2-City.mmdb
|__GeoLite2-Country.mmdb

Then, in our project's settings.py we want to add the following variable:
GEOIP_PATH = os.path.join(BASE_DIR, 'geoip')
In this case, geoip is whatever folder we put the two database files in.

Finally (and I am pretty sure this is optional), we want to do:
$ export DJANGO_SETTINGS_MODULE=project.settings

Now, we should be able to do all the things as in the docs:

>>> from django.contrib.gis.geoip2 import GeoIP2
>>> g = GeoIP2()

>>> g.country('google.com')
{'country_code': 'US', 'country_name': 'United States'}

>>> g.city('72.14.207.99')
#formatted for readability
{
	'city': 'Mountain View',
	'continent_code': 'NA',
	'continent_name': 'North America',
	'country_code': 'US',
	'country_name': 'United States',
	'dma_code': 807,
	'is_in_european_union': False,
	'latitude': 37.419200897216797,
	'longitude': -122.05740356445312,
	'postal_code': '94043',
	'region': 'CA',
	'time_zone': 'America/Los_Angeles'
}

>>> g.lat_lon('salon.com')
(39.0437, -77.4875)

>>> g.lon_lat('uh.edu')
(-95.4342, 29.834)

>>> g.geos('24.124.1.80').wkt
'POINT (-97 38)'