1
0
Fork 0
mirror of https://github.com/Findus23/RPGnotes.git synced 2024-09-20 16:53:44 +02:00
RPGnotes/common/management/commands/listusers.py

16 lines
400 B
Python
Raw Normal View History

2021-09-24 19:08:06 +02:00
from django.core.management.base import BaseCommand
from users.models import TenantUser
class Command(BaseCommand):
help = 'List all users registered on instance'
def __init__(self, *args, **kwargs):
super(Command, self).__init__(*args, **kwargs)
def handle(self, *args, **options):
users = TenantUser.objects.all()
for user in users:
print(user)