How to store some API client instance and make it available across the whole project.
API client instance
- is some AppApi()
and I need to call it's methods in different views (and even apps) from whole django project.
As for me, there are two ways:
- create a global variable in some core django app
core/apps.py
module; - create singleton wrapper;
What is the best and proper way to do in this case?
Aucun commentaire:
Enregistrer un commentaire