Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, get_response=None):
"""Initializes class while gettings user settings and creating the cache."""
self.get_response = get_response
self.filter = getattr(settings, "IPINFO_FILTER", self.is_bot)
ipinfo_token = getattr(settings, "IPINFO_TOKEN", None)
ipinfo_settings = getattr(settings, "IPINFO_SETTINGS", {})
self.ipinfo = ipinfo.getHandler(ipinfo_token, **ipinfo_settings)