Settings

django-geoip has some public and internal configuration:

class django_geoip.geoip_settings.GeoIpConfig(**kwargs)

GeoIP configuration

COOKIE_DOMAIN = ''

Fill in for custom case

COOKIE_EXPIRES = 31622400

Cookie lifetime in seconds (1 year by default)

COOKIE_NAME = 'geoip_location_id'

Cookie stores location model primary key

LOCATION_MODEL = 'django_geoip.models.GeoLocationFascade'

Provide a model that stores geography, specific to your application

STORAGE_CLASS = 'django_geoip.storage.LocationCookieStorage'

Persistant storage class for user location (cookies or dummy are available)

Project Versions

Previous topic

Updating GeoIP database

Next topic

Reference

This Page