expire all auth tokens when updating (will force page reload to pull latest index.html)
This commit is contained in:
parent
2b9e9b8b1b
commit
78a8e63e0a
|
@ -0,0 +1,10 @@
|
|||
from django.core.management.base import BaseCommand
|
||||
from knox.models import AuthToken
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = "Deletes all knox tokens"
|
||||
|
||||
def handle(self, *args, **kwargs):
|
||||
AuthToken.objects.all().delete()
|
||||
self.stdout.write("All tokens have been deleted!")
|
Loading…
Reference in New Issue