1
0
Fork 0
mirror of https://github.com/Findus23/RPGnotes.git synced 2024-09-19 15:43:45 +02:00
RPGnotes/common/management/commands/listusers.py
2023-04-25 22:16:28 +02:00

15 lines
387 B
Python

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().__init__(*args, **kwargs)
def handle(self, *args, **options):
users = TenantUser.objects.all()
for user in users:
print(user)