mirror of
https://github.com/jazzband/django-axes.git
synced 2026-03-16 22:30:23 +00:00
17 lines
459 B
Python
17 lines
459 B
Python
from __future__ import unicode_literals
|
|
|
|
from django.core.management.base import BaseCommand
|
|
|
|
from axes.utils import reset
|
|
|
|
|
|
class Command(BaseCommand):
|
|
help = 'Reset all access attempts and lockouts'
|
|
|
|
def handle(self, *args, **options): # pylint: disable=unused-argument
|
|
count = reset()
|
|
|
|
if count:
|
|
self.stdout.write('{0} attempts removed.'.format(count))
|
|
else:
|
|
self.stdout.write('No attempts found.')
|