-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck_settings.py
More file actions
30 lines (26 loc) · 954 Bytes
/
Copy pathcheck_settings.py
File metadata and controls
30 lines (26 loc) · 954 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env python
"""
Simple script to verify Django settings are loaded correctly.
Run this on your Render.com environment to debug settings issues.
"""
import os
import sys
import django
# Set the Django settings module
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'socialcal.settings')
# Initialize Django
django.setup()
# Import settings after Django is initialized
from django.conf import settings
# Print key settings for debugging
print("=" * 50)
print("Django Settings Verification")
print("=" * 50)
print(f"DEBUG: {settings.DEBUG}")
print(f"ALLOWED_HOSTS: {settings.ALLOWED_HOSTS}")
print(f"'www.socialcal.io' in ALLOWED_HOSTS: {'www.socialcal.io' in settings.ALLOWED_HOSTS}")
print(f"Environment Variables:")
print(f" RENDER: {os.environ.get('RENDER', 'Not set')}")
print(f" DEBUG: {os.environ.get('DEBUG', 'Not set')}")
print(f" ADDITIONAL_ALLOWED_HOSTS: {os.environ.get('ADDITIONAL_ALLOWED_HOSTS', 'Not set')}")
print("=" * 50)