django-defender/defender/data.py
Aleksi Häkli a1d526f318
PEP8 formatting (#147)
Run black with Python 2.7 as target version
to unify the code styling and make it more
linter and style guide compliant
2019-11-15 20:22:14 +02:00

15 lines
409 B
Python

from .models import AccessAttempt
def store_login_attempt(
user_agent, ip_address, username, http_accept, path_info, login_valid
):
""" Store the login attempt to the db. """
AccessAttempt.objects.create(
user_agent=user_agent,
ip_address=ip_address,
username=username,
http_accept=http_accept,
path_info=path_info,
login_valid=login_valid,
)