mirror of
https://github.com/pinry/pinry.git
synced 2026-01-11 01:32:05 +01:00
feature: add command to reset all tokens
This commit is contained in:
0
users/management/__init__.py
Normal file
0
users/management/__init__.py
Normal file
0
users/management/commands/__init__.py
Normal file
0
users/management/commands/__init__.py
Normal file
7
users/management/commands/users_reset_tokens.py
Normal file
7
users/management/commands/users_reset_tokens.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from django.core.management import BaseCommand
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
def handle(self, *args, **options):
|
||||
from rest_framework.authtoken.models import Token
|
||||
Token.objects.all().delete()
|
||||
Reference in New Issue
Block a user