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
""" | |
Original gist: https://gist.github.com/dmwyatt/5cf7e5102ed0a01b7d38aabf322e03b2 | |
""" | |
import logging | |
from typing import Awaitable, Final, List, TYPE_CHECKING, TypedDict | |
from channels.auth import AuthMiddlewareStack | |
from channels.db import database_sync_to_async | |
from django.contrib.auth.models import AnonymousUser |