1. Hadi Moshayedi
  2. django-tracking

Commits

Hadi Moshayedi  committed 29ef5aa

get_ip_country fixed

  • Participants
  • Parent commits d68cb24
  • Branches default

Comments (0)

Files changed (1)

File tracking/utils.py

View file
  • Ignore whitespace
         return result
     gip = pygeoip.GeoIP(settings.GEOIP_PATH)
     try:
-        country = geoip.country_code_by_addr(ip_address)
+        country = gip.country_code_by_addr(ip_address)
     except:
         country = 'US'
     r_server.set(key, country)