diff --git a/src/booking.py b/src/booking.py index f1fe95f..6c07355 100644 --- a/src/booking.py +++ b/src/booking.py @@ -7,6 +7,7 @@ import markdown import requests import shortuuid +from django.conf.global_settings import CSRF_TRUSTED_ORIGINS from django.core.validators import URLValidator from django.db import models from django.shortcuts import render, get_object_or_404 @@ -32,13 +33,15 @@ app = Django( SECRET_KEY=DJANGO_SECRET_KEY, TIME_ZONE=os.getenv("TIME_ZONE", "Europe/Berlin"), ALLOWED_HOSTS=["localhost"] + [host for host in - os.getenv("ALLOWED_HOSTS", "").split(",")], + os.getenv("DJANGO_ALLOWED_HOSTS", "").split(",")], SQLITE_DATABASE=DATA_DIR / "db.sqlite3", DEBUG=DEBUG, TEMPLATES_DIR=BASE_DIR / "templates", STATICFILES_DIRS=[ BASE_DIR / "static", ], + CSRF_TRUSTED_ORIGINS=[host for host in + os.getenv("DJANGO_ALLOWED_HOSTS", "").split(",")] ) # Import ninja after nanodjango has been initialised to avoid this error: diff --git a/version.txt b/version.txt index e6d5cb8..e4c0d46 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.0.2 \ No newline at end of file +1.0.3 \ No newline at end of file