Commits

Hadi Moshayedi  committed 29ef5aa

get_ip_country fixed

  • Participants
  • Parent commits d68cb24

Comments (0)

Files changed (1)

File tracking/utils.py

         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)