mirror of
https://github.com/jazzband/django-axes.git
synced 2026-05-11 09:03:12 +00:00
Merge pull request #72 from marianov/master
Admin command to list login attemps
This commit is contained in:
commit
c8232773d1
1 changed files with 13 additions and 0 deletions
13
axes/management/commands/axes_list_attempts.py
Normal file
13
axes/management/commands/axes_list_attempts.py
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
from django.core.management.base import BaseCommand
|
||||
from django.core.management.base import CommandError
|
||||
|
||||
from axes.models import AccessAttempt
|
||||
|
||||
class Command(BaseCommand):
|
||||
args = ''
|
||||
help = ("List login attempts")
|
||||
|
||||
def handle(self, *args, **kwargs):
|
||||
for at in AccessAttempt.objects.all():
|
||||
print "%s %s %s" % (at.ip_address, at.username, at.failures)
|
||||
|
||||
Loading…
Reference in a new issue