Settings

django-geoip has some public configuration:

class django_geoip.geoip_settings.GeoIpConfig(**kwargs)

GeoIP configuration

COOKIE_DOMAIN = ''

Cookie domain for LocationCookieStorage class.

COOKIE_EXPIRES = 31622400

Cookie lifetime in seconds (1 year by default) for LocationCookieStorage class.

COOKIE_NAME = 'geoip_location_id'

Cookie name for LocationCookieStorage class (stores custom location’s primary key).

LOCATION_MODEL = 'django_geoip.models.GeoLocationFascade'

A reference to a model that stores custom geography, specific to application.

STORAGE_CLASS = 'django_geoip.storage.LocationCookieStorage'

Persistent storage class for user location

Project Versions

Previous topic

Updating GeoIP database

Next topic

Reference

This Page