[Answered ]-Django app on Azure incorrectly loading static files from an Azure Blob

1👍

Try with adding below in app setting

    DEFAULT_FILE_STORAGE = 'backend.custom_azure.AzureMediaStorage'
    STATICFILES_STORAGE = 'backend.custom_azure.AzureStaticStorage'
    
    STATIC_LOCATION = "static"
    MEDIA_LOCATION = "media"
    
    AZURE_ACCOUNT_NAME = "djangoaccountstorage"
    AZURE_CUSTOM_DOMAIN = f'{AZURE_ACCOUNT_NAME}.blob.core.windows.net'
    STATIC_URL = f'https://{AZURE_CUSTOM_DOMAIN}/{STATIC_LOCATION }/'
    MEDIA_URL = f'https://{AZURE_CUSTOM_DOMAIN}/{MEDIA_LOCATION}

refer this document for more details

Leave a comment