From 185ca3f354a20905538c08a47f638b45c4cb3af1 Mon Sep 17 00:00:00 2001 From: Mattia Giambirtone Date: Wed, 5 Oct 2022 15:46:01 +0200 Subject: [PATCH] Various fixes to default config files --- config.py.example | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/config.py.example b/config.py.example index f378a1d..f28db46 100644 --- a/config.py.example +++ b/config.py.example @@ -1,7 +1,8 @@ -# Configuration file. Each variable can be overridden by a +config.py.example# Configuration file. Each variable can be overridden by a # corresponding environment variable import os import sys +import copy import logging import pathlib @@ -115,6 +116,7 @@ if __name__ != "__main__": use_header=USE_BEARER_HEADER, custom_exception=NotAuthenticated, ) + UNVERIFIED_MANAGER = copy.deepcopy(MANAGE ADMIN_MANAGER = LoginManager( LOGIN_SECRET_KEY, "/admin", @@ -129,3 +131,12 @@ if __name__ != "__main__": HOST = os.getenv("HOST") or "localhost" PORT = int(os.getenv("PORT") or 0) or 8000 WORKERS = int(os.getenv("PORT") or 0) or 1 + +# Storage configuration + +STORAGE_ENGINE = "database" # Stores media inside the database. Other options are "local" to use a local/remote folder + # or "url" for uploading to a CDN +STORAGE_FOLDER = "" # Only needed when STORAGE_ENGINE is set to local +MAX_MEDIA_SIZE = 5242880 # Max length of media allowed. Anything bigger raises a 415 HTTP Exception +ALLOWED_MEDIA_TYPES = ["gif", "png", "jpeg", "tiff"] +ZLIB_COMPRESSION_LEVEL = 9 \ No newline at end of file