Browse Source

feature: add command to reset all tokens

tags/v2.1.7
winkidney 2 years ago
parent
commit
03d1aed7aa
3 changed files with 7 additions and 0 deletions
  1. +0
    -0
      users/management/__init__.py
  2. +0
    -0
      users/management/commands/__init__.py
  3. +7
    -0
      users/management/commands/users_reset_tokens.py

+ 0
- 0
users/management/__init__.py View File


+ 0
- 0
users/management/commands/__init__.py View File


+ 7
- 0
users/management/commands/users_reset_tokens.py View 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()

Loading…
Cancel
Save