Django
django Chennels 활용 Websocket 통신 # 3 (consumers.py)
JOOHUUN
2022. 7. 17. 22:09
https://channels.readthedocs.io/en/stable/topics/databases.html
@database_sync_to_async
Database Access — Channels 3.0.5 documentation
Database Access The Django ORM is a synchronous piece of code, and so if you want to access it from asynchronous code you need to do special handling to make sure its connections are closed properly. If you’re using SyncConsumer, or anything based on it
channels.readthedocs.io