mirror of
https://github.com/sissbruecker/linkding
synced 2024-11-25 12:50:23 +00:00
3ae9cf0420
* start converting * small fixes * reorganize theme files * cleanup search bar * increase spacing * small tweaks * fix select styles in Chrome * cleanup menus * improve button icons * restore badges * remove unused classes * restore some overrides * restore bookmark form * add summary outline * avoid layout shifts * restore bookmark details * increase border radius for modals * improve details modal * restore reader mode * restore settings * cleanup variables * start with dark theme * more dark theme... * more light theme... * more dark theme... * add postcss build * remove sass processor * update docker build * fix alt color * remove endless symbol * fix tests * update assets * remove sass files * fix docker build * cleanup spacing * improve theme * update test scripts * update CI workflow * fix test
61 lines
1.4 KiB
Python
61 lines
1.4 KiB
Python
"""
|
|
Production settings for linkding webapp
|
|
"""
|
|
|
|
# Start from development settings
|
|
# noinspection PyUnresolvedReferences
|
|
import os
|
|
|
|
from django.core.management.utils import get_random_secret_key
|
|
from .base import *
|
|
|
|
# Turn of debug mode
|
|
DEBUG = False
|
|
|
|
# Try read secret key from file
|
|
try:
|
|
with open(os.path.join(BASE_DIR, "data", "secretkey.txt")) as f:
|
|
SECRET_KEY = f.read().strip()
|
|
except:
|
|
SECRET_KEY = get_random_secret_key()
|
|
|
|
# Set ALLOWED_HOSTS
|
|
# By default look in the HOST_NAME environment variable, if that is not set then allow all hosts
|
|
host_name = os.environ.get("HOST_NAME")
|
|
if host_name:
|
|
ALLOWED_HOSTS = [host_name]
|
|
else:
|
|
ALLOWED_HOSTS = ["*"]
|
|
|
|
# Logging
|
|
LOGGING = {
|
|
"version": 1,
|
|
"disable_existing_loggers": False,
|
|
"formatters": {
|
|
"simple": {
|
|
"format": "{asctime} {levelname} {message}",
|
|
"style": "{",
|
|
},
|
|
},
|
|
"handlers": {"console": {"class": "logging.StreamHandler", "formatter": "simple"}},
|
|
"root": {
|
|
"handlers": ["console"],
|
|
"level": "WARN",
|
|
},
|
|
"loggers": {
|
|
"bookmarks": {
|
|
"level": "INFO",
|
|
"handlers": ["console"],
|
|
"propagate": False,
|
|
},
|
|
"huey": {
|
|
"level": "INFO",
|
|
"handlers": ["console"],
|
|
"propagate": False,
|
|
},
|
|
},
|
|
}
|
|
|
|
# Import custom settings
|
|
# noinspection PyUnresolvedReferences
|
|
from .custom import *
|