mirror of
https://github.com/jazzband/django-axes.git
synced 2026-05-28 08:48:19 +00:00
15 lines
374 B
Python
15 lines
374 B
Python
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):
|
|
count = reset()
|
|
|
|
if count:
|
|
self.stdout.write(f"{count} attempts removed.")
|
|
else:
|
|
self.stdout.write("No attempts found.")
|