From 86675ee944b55fa47fa2561b5ccb6b34d108eda5 Mon Sep 17 00:00:00 2001 From: Chris Moultrie <821688+tebriel@users.noreply.github.com> Date: Wed, 8 Mar 2023 14:48:04 -0500 Subject: [PATCH] Example Settings and run black --- .env.example | 6 ++++++ bookwyrm/settings.py | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index 2be08224b..3b541eb7c 100644 --- a/.env.example +++ b/.env.example @@ -82,6 +82,12 @@ AWS_SECRET_ACCESS_KEY= # AWS_S3_REGION_NAME=None # "fr-par" # AWS_S3_ENDPOINT_URL=None # "https://s3.fr-par.scw.cloud" +# Commented are example values if you use Azure Blob Storage +# USE_AZURE=true +# AZURE_ACCOUNT_NAME= # "example-account-name" +# AZURE_ACCOUNT_KEY= # "base64-encoded-access-key" +# AZURE_CONTAINER= # "example-blob-container-name" +# AZURE_CUSTOM_DOMAIN= # "example-account-name.blob.core.windows.net" # Preview image generation can be computing and storage intensive ENABLE_PREVIEW_IMAGES=False diff --git a/bookwyrm/settings.py b/bookwyrm/settings.py index b94d86615..0c298e48d 100644 --- a/bookwyrm/settings.py +++ b/bookwyrm/settings.py @@ -372,11 +372,15 @@ elif USE_AZURE: AZURE_CUSTOM_DOMAIN = env("AZURE_CUSTOM_DOMAIN") # Azure Static settings STATIC_LOCATION = "static" - STATIC_URL = f"{PROTOCOL}://{AZURE_CUSTOM_DOMAIN}/{AZURE_CONTAINER}/{STATIC_LOCATION}/" + STATIC_URL = ( + f"{PROTOCOL}://{AZURE_CUSTOM_DOMAIN}/{AZURE_CONTAINER}/{STATIC_LOCATION}/" + ) STATICFILES_STORAGE = "bookwyrm.storage_backends.AzureStaticStorage" # Azure Media settings MEDIA_LOCATION = "images" - MEDIA_URL = f"{PROTOCOL}://{AZURE_CUSTOM_DOMAIN}/{AZURE_CONTAINER}/{MEDIA_LOCATION}/" + MEDIA_URL = ( + f"{PROTOCOL}://{AZURE_CUSTOM_DOMAIN}/{AZURE_CONTAINER}/{MEDIA_LOCATION}/" + ) MEDIA_FULL_URL = MEDIA_URL STATIC_FULL_URL = STATIC_URL DEFAULT_FILE_STORAGE = "bookwyrm.storage_backends.AzureImagesStorage"