code: def ip_geoloc(ip, hit_api=True):
      
      from ..logs.models import IPInfoCheck
      try:
          obj = IPInfoCheck.objects.get(ip_address=ip).ip_info
      except IPInfoCheck.DoesNotExist:
          if hit_api:
              try:
                  obj = IPInfoCheck.check_ip(ip)
              except RateExceededError:
                  return None
          else:
              return None
      return obj.latitude, obj.longitude
docs: Get IP geolocation.
  
      Args:
          ip (str): IP address to use if no data provided.
          hit_api (bool): whether to hit api if info not found.
  
      Returns:
          str: latitude and longitude, comma-separated.