production-taskbar / backend / tgbot / handlers / utils / django_info.py
django_info.py
Raw
# type: ignore
# mypy crashes on import from django.contrib.auth with [LookupError: No installed app with label auth]
from channels.db import database_sync_to_async

from django.contrib.auth import get_user_model


@database_sync_to_async
def get_users():
    return list(get_user_model().objects.all())