From 69941166a1e37d7c1321c416ed936efbe22b31bb Mon Sep 17 00:00:00 2001 From: Michael Bergbauer Date: Fri, 18 Jul 2025 17:33:49 +0200 Subject: [PATCH] Moving ALLOWED_HOSTS to env file --- FloriCore/settings.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/FloriCore/settings.py b/FloriCore/settings.py index b7fede5..a936047 100644 --- a/FloriCore/settings.py +++ b/FloriCore/settings.py @@ -12,7 +12,8 @@ https://docs.djangoproject.com/en/5.2/ref/settings/ import pymysql pymysql.install_as_MySQLdb() from pathlib import Path -from decouple import config +from decouple import config, Csv + # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent @@ -27,7 +28,7 @@ SECRET_KEY = 'django-insecure-tulz*odc=l1x(g^-=ne!y7^@lg1uce)=ha^!0wi5qkifq&#^sg # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = [ "albani.sternbauer.de" ] +ALLOWED_HOSTS = config("DJANGO_ALLOWED_HOSTS", default="localhost", cast=Csv()) # Application definition