We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c222460 + 669d619 commit d6f5833Copy full SHA for d6f5833
django_rest_passwordreset/management/commands/clearresetpasswodtokens.py
@@ -1,5 +1,6 @@
1
from django.core.management.base import BaseCommand
2
from django.utils import timezone
3
+import datetime
4
5
from django_rest_passwordreset.models import clear_expired, get_password_reset_token_expiry_time
6
@@ -9,5 +10,5 @@ class Command(BaseCommand):
9
10
11
def handle(self, *args, **options):
12
# datetime.now minus expiry hours
- now_minus_expiry_time = timezone.now() - timedelta(hours=get_password_reset_token_expiry_time())
13
+ now_minus_expiry_time = timezone.now() - datetime.timedelta(hours=get_password_reset_token_expiry_time())
14
clear_expired(now_minus_expiry_time)
0 commit comments