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

16 lines
387 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):
2023-04-25 22:16:28 +02:00
super().__init__(*args, **kwargs)
2021-09-24 19:08:06 +02:00
def handle(self, *args, **options):
users = TenantUser.objects.all()
for user in users:
print(user)