@property<EOL><INDENT>def geoip_data(self):<DEDENT>
if not HAS_GEOIP or not TRACK_USING_GEOIP:<EOL><INDENT>return<EOL><DEDENT>if not hasattr(self, '<STR_LIT>'):<EOL><INDENT>self._geoip_data = None<EOL>try:<EOL><INDENT>gip = GeoIP(cache=GEOIP_CACHE_TYPE)<EOL>self._geoip_data = gip.city(self.ip_address)<EOL><DEDENT>except GeoIPException:<EOL><INDENT>msg = '<STR_LIT>'.format(<EOL>self.ip_address)<EOL>log.exception(msg)<EOL><DEDENT><DEDENT>return self._geoip_data<EOL>
Attempt to retrieve MaxMind GeoIP data based on visitor's IP.