Last active
July 12, 2018 10:06
-
-
Save klashxx/da42c6441b0e3cc5de3fe1d6002d5c1f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib.sessions.models import Session | |
from account.models import Usuario | |
for s in Session.objects.all(): | |
print (s) | |
uid = s.get_decoded().get('_auth_user_id') | |
if uid is None: | |
continue | |
user = Usuario.objects.get(pk=uid) | |
print (user.username, user.get_full_name()) | |
# Session.objects.all().delete() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment