akvo.rsr.models.login_log module

class akvo.rsr.models.login_log.LoginLog(*args, **kwargs)[source]

Bases: TimestampsMixin

Model to log login attempts of users.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

created_at

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

email

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

last_modified_at

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
success

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

akvo.rsr.models.login_log.count_failed_attempts(username)[source]
akvo.rsr.models.login_log.is_login_disabled(username)[source]
akvo.rsr.models.login_log.log_failed_login(sender, credentials, **kwargs)[source]

A signal receiver to log failed login attempts.

3 failed logins before a successful login, sets the password to an unusable one, so that the user is forced to reset the password.

akvo.rsr.models.login_log.log_succeeded_login(sender, user, **kwargs)[source]

A signal receiver to log succeeded login