added whitenoise again

This commit is contained in:
Jonas Winkler
2020-10-27 01:09:50 +01:00
parent 2c21b3b8ba
commit d5a1a4916e
3 changed files with 53 additions and 21 deletions

View File

@@ -18,8 +18,8 @@ from dotenv import load_dotenv
# Tap paperless.conf if it's available
if os.path.exists("paperless.conf"):
load_dotenv("paperless.conf")
if os.path.exists("../paperless.conf"):
load_dotenv("../paperless.conf")
elif os.path.exists("/etc/paperless.conf"):
load_dotenv("/etc/paperless.conf")
elif os.path.exists("/usr/local/etc/paperless.conf"):
@@ -72,6 +72,8 @@ FORCE_SCRIPT_NAME = os.getenv("PAPERLESS_FORCE_SCRIPT_NAME")
# Application definition
INSTALLED_APPS = [
"whitenoise.runserver_nostatic",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
@@ -104,6 +106,7 @@ REST_FRAMEWORK = {
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'corsheaders.middleware.CorsMiddleware',
'django.middleware.common.CommonMiddleware',