database access from asynchronous code in Django-channels
user408 Published in April 19, 2018, 9:55 am
I need some help. I'm using Django-channels and I need for some purpose make several DB calls. Docs not clear for me: https://channels.readthedocs.io/en/latest/topics/databases.html
So, what one of the following is the right way?
1. Create/call function for each database access with a decorator.
2. Make all calls to the database in one function, which wrapped by decorator?