

def convert_identifier_to_key(self, identifier):
    '\n        Takes an identifier (like a username or IP address) and converts it\n        into a key usable by the cache system.\n        '
    bits = []
    for char in identifier:
        if (char.isalnum() or (char in ['_', '.', '-'])):
            bits.append(char)
    safe_string = ''.join(bits)
    return ('%s_accesses' % safe_string)

dataset/ETHPy150Open hzlf/openbroadcast/website/apps/tastypie/throttle.py BaseThrottle.convert_identifier_to_key/original