'Ticks the failed attempt counter'

@classmethod
def increment_lockout_counter(cls, user):

    (record, _) = LoginFailures.objects.get_or_create(user=user)
    record.failure_count = (record.failure_count + 1)
    max_failures_allowed = settings.MAX_FAILED_LOGIN_ATTEMPTS_ALLOWED
    if (record.failure_count >= max_failures_allowed):
        lockout_period_secs = settings.MAX_FAILED_LOGIN_ATTEMPTS_LOCKOUT_PERIOD_SECS
        record.lockout_until = (datetime.now(UTC) + timedelta(seconds=lockout_period_secs))
    record.save()
