static url fix
This commit is contained in:
@@ -16,7 +16,8 @@ except ImportError:
|
||||
|
||||
# Django settings for blechreiz project.
|
||||
|
||||
DEBUG = True
|
||||
# Set DJANGO_DEBUG=True in .env for local development; leave unset (or False) in production.
|
||||
DEBUG = os.environ.get("DJANGO_DEBUG", "False") == "True"
|
||||
|
||||
ADMINS = [
|
||||
("Martin Bauer", "bauer_martin@gmx.de"),
|
||||
@@ -76,6 +77,9 @@ PUBLIC_URLS = (
|
||||
"^musicians/login/?$",
|
||||
"^musicians/login/usernames/?$",
|
||||
"^eventplanner_gcal/gcalApiCallback*",
|
||||
# Static and media files must be accessible without login
|
||||
r"^static/",
|
||||
r"^media/",
|
||||
)
|
||||
|
||||
# Additional locations of static files
|
||||
@@ -94,6 +98,8 @@ SECRET_KEY = os.environ["DJANGO_SECRET_KEY"]
|
||||
|
||||
MIDDLEWARE = [
|
||||
"django.middleware.security.SecurityMiddleware",
|
||||
# WhiteNoise serves static files directly — must be right after SecurityMiddleware
|
||||
"whitenoise.middleware.WhiteNoiseMiddleware",
|
||||
"django.contrib.sessions.middleware.SessionMiddleware",
|
||||
"django.middleware.common.CommonMiddleware",
|
||||
"django.middleware.csrf.CsrfViewMiddleware",
|
||||
|
||||
Reference in New Issue
Block a user