Skip to content

Commit

Permalink
Rename value
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiormb committed Apr 10, 2019
1 parent 5ca60b1 commit 27132a8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions django_country2/geo.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
COUNTRY_COOKIE_NAME = getattr(settings, 'COUNTRY_COOKIE_NAME', 'country')
COUNTRY_COOKIE_AGE = getattr(settings, 'COUNTRY_COOKIE_AGE', None)
COUNTRY_COOKIE_PATH = getattr(settings, 'COUNTRY_COOKIE_PATH', '/')
HEADER_FORZE_COUNTRY = getattr(settings, 'HEADER_FORZE_COUNTRY', False)
HEADER_FORCE_COUNTRY = getattr(settings, 'HEADER_FORCE_COUNTRY', None)
USE_GEOIP = getattr(settings, 'USE_GEOIP', False)
USE_LOCALE = getattr(settings, 'USE_LOCALE', False)

Expand All @@ -34,16 +34,16 @@ def get_country_from_request(request):
Analyzes the request to find which country the user wants
the system to recognize. It checks the following sources
in the given order:
* HEADER forze country
* HEADER FORCE country
* session,
* cookie,
* HTTP_ACCEPT_LANGUAGE HTTP header, and
* IP address if USE_GEOIP is True.
It returns country code in ISO 3166-1 alpha-2 format.
"""
if HEADER_FORZE_COUNTRY:
country_code = request.META.get(HEADER_FORZE_COUNTRY, None)
if HEADER_FORCE_COUNTRY:
country_code = request.META.get(HEADER_FORCE_COUNTRY, None)
if country_code:
return get_supported_country(country_code)

Expand Down

0 comments on commit 27132a8

Please sign in to comment.