from environs import Env from storages.backends.azure_storage import AzureStorage env = Env() env.read_env() class AzureMediaStorage(AzureStorage): if env("IT_USE_AZURE_BLOB_STORAGE", False): account_name = env("IT_AZURE_STORAGE_ACCOUNT") account_key = env("IT_AZURE_STORAGE_KEY") azure_container = "media" expiration_secs = None class AzureStaticStorage(AzureStorage): if env("IT_USE_AZURE_BLOB_STORAGE", False): account_name = env("IT_AZURE_STORAGE_ACCOUNT") account_key = env("IT_AZURE_STORAGE_KEY") azure_container = "static" expiration_secs = None