diff --git a/student_management_system/settings.py b/student_management_system/settings.py index c12213d..b764a53 100644 --- a/student_management_system/settings.py +++ b/student_management_system/settings.py @@ -25,12 +25,12 @@ BASE_DIR = Path(__file__).resolve().parent.parent # See https://docs.djangoproject.com/en/5.1/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = os.getenv('DJANGO_SECRET_KEY') +SECRET_KEY = os.getenv("DJANGO_SECRET_KEY") # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = os.getenv('DJANGO_DEBUG', 'False') == 'True' +DEBUG = os.getenv("DJANGO_DEBUG", "False") == "True" -ALLOWED_HOSTS = os.getenv('DJANGO_ALLOWED_HOSTS', '*').split(',') +ALLOWED_HOSTS = os.getenv("DJANGO_ALLOWED_HOSTS", "*").split(",") # Application definition @@ -151,31 +151,35 @@ JAZZMIN_SETTINGS = JAZZMIN_SETTINGS JAZZMIN_UI_TWEAKS = JAZZMIN_UI_TWEAKS # Login redirect URL -LOGIN_REDIRECT_URL = '/app/dashboard/' -LOGIN_URL = '/login/' +LOGIN_REDIRECT_URL = "/app/dashboard/" +LOGIN_URL = "/login/" # Email Configuration -EMAIL_BACKEND = os.getenv('EMAIL_BACKEND', 'django.core.mail.backends.console.EmailBackend') -DEFAULT_FROM_EMAIL = os.getenv('DEFAULT_FROM_EMAIL', 'noreply@studentmanagementsystem.com') +EMAIL_BACKEND = os.getenv( + "EMAIL_BACKEND", "django.core.mail.backends.console.EmailBackend" +) +DEFAULT_FROM_EMAIL = os.getenv( + "DEFAULT_FROM_EMAIL", "noreply@studentmanagementsystem.com" +) # Cache configuration for OTP storage CACHES = { - 'default': { - 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', - 'LOCATION': os.getenv('CACHE_LOCATION', 'unique-snowflake'), + "default": { + "BACKEND": "django.core.cache.backends.locmem.LocMemCache", + "LOCATION": os.getenv("CACHE_LOCATION", "unique-snowflake"), } } # SMS API configuration -SMS_API_KEY = os.getenv('SMS_API_KEY', '') -SMS_SENDER_ID = os.getenv('SMS_SENDER_ID', 'SMSSYS') +SMS_API_KEY = os.getenv("SMS_API_KEY", "") +SMS_SENDER_ID = os.getenv("SMS_SENDER_ID", "SMSSYS") -CSRF_TRUSTED_ORIGINS = [ - "https://ab4c-2405-acc0-1504-65ce-00-2.ngrok-free.app" -] - -CSRF_TRUSTED_ORIGINS = [ - "https://*.ngrok-free.app", - "https://*.ngrok.io" -] +# CSRF_TRUSTED_ORIGINS = [ +# "https://ab4c-2405-acc0-1504-65ce-00-2.ngrok-free.app" +# ] +# +# CSRF_TRUSTED_ORIGINS = [ +# "https://*.ngrok-free.app", +# "https://*.ngrok.io" +# ]