This section comtains documentation to module internals, useful for django-geoip developers.
Interface for custom geographic models. Model represents a fascade pattern for concrete GeoIP models.
Return all locations available for users to select in frontend
Returns: | GeoLocationFascade |
---|
Return single model instance for given IP range. If no location matches the range, raises DoesNotExist exception.
Parameters: | ip_range (IpRange) – User’s IpRange to search for. |
---|---|
Returns: | GeoLocationFascade single object |
Return default location for cases where ip geolocation fails.
Returns: | GeoLocationFascade |
---|
A helper class that automates user location detection.
Check whether user location will be detected by ip or fetched from storage.
Useful for integration with django-hosts.
Find out what is user location (either from his IP or cookie).
Returns: | Custom location model |
---|
django_geoip.base.location_model – SimpleLazyObject to get current location model.