Various fixes to default config files
This commit is contained in:
parent
f1d04112d7
commit
185ca3f354
|
@ -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
|
# corresponding environment variable
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import copy
|
||||||
import logging
|
import logging
|
||||||
import pathlib
|
import pathlib
|
||||||
|
|
||||||
|
@ -115,6 +116,7 @@ if __name__ != "__main__":
|
||||||
use_header=USE_BEARER_HEADER,
|
use_header=USE_BEARER_HEADER,
|
||||||
custom_exception=NotAuthenticated,
|
custom_exception=NotAuthenticated,
|
||||||
)
|
)
|
||||||
|
UNVERIFIED_MANAGER = copy.deepcopy(MANAGE
|
||||||
ADMIN_MANAGER = LoginManager(
|
ADMIN_MANAGER = LoginManager(
|
||||||
LOGIN_SECRET_KEY,
|
LOGIN_SECRET_KEY,
|
||||||
"/admin",
|
"/admin",
|
||||||
|
@ -129,3 +131,12 @@ if __name__ != "__main__":
|
||||||
HOST = os.getenv("HOST") or "localhost"
|
HOST = os.getenv("HOST") or "localhost"
|
||||||
PORT = int(os.getenv("PORT") or 0) or 8000
|
PORT = int(os.getenv("PORT") or 0) or 8000
|
||||||
WORKERS = int(os.getenv("PORT") or 0) or 1
|
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
|
Loading…
Reference in New Issue