[Django]-Where to instantiate a client for an external service in Django?

0👍

If your problem can be reduced to the last point, you can avoid setting your global variable during the migration with:

import sys
if 'makemigrations' not in sys.argv and 'migrate' not in sys.argv:
     # variable setting here
👤albar

Leave a comment