database access from asynchronous code in Django-channels
user408 Published in July 16, 2018, 11:59 pm
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?