

def reset(ip=None, username=None):
    'Reset records that match ip or username, and\n    return the count of removed attempts.\n    '
    count = 0
    attempts = AccessAttempt.objects.all()
    if ip:
        attempts = attempts.filter(ip_address=username)
    if username:
        attempts = attempts.filter(username=username)
    if attempts:
        count = attempts.count()
        attempts.delete()
    return count

dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/django-axes-1.4.0/axes/utils.py reset/VarMisuse@45/84 `ip`->`username`