diff --git a/accountsplus/settings.py b/accountsplus/settings.py index 19bc6f1..6457653 100644 --- a/accountsplus/settings.py +++ b/accountsplus/settings.py @@ -79,5 +79,3 @@ def get_lockout_template(): SUPPORTED_LANGUAGES = get_setting('LANGUAGES', False, DEFAULT_SUPPORTED_LANGUAGES) DEFAULT_LANGUAGE = get_setting('LANGUAGE_CODE', False, ENGLISH_LANGUAGE) - -GEOIP_URL = 'http://freegeoip.net/json' diff --git a/accountsplus/timezone_utils.py b/accountsplus/timezone_utils.py index f4aa694..013e171 100644 --- a/accountsplus/timezone_utils.py +++ b/accountsplus/timezone_utils.py @@ -3,13 +3,15 @@ import requests import pytz from ipware.ip import get_real_ip -from django.conf import settings + + +GEOIP_URL = 'http://freegeoip.net/json' def get_user_timezone_from_ip_address(request): ip = get_real_ip(request) - freegeoip_response = requests.get('{0}/{1}'.format(settings.GEOIP_URL, ip)) + freegeoip_response = requests.get('{0}/{1}'.format(GEOIP_URL, ip)) freegeoip_response_json = freegeoip_response.json() user_time_zone = freegeoip_response_json['time_zone']