diff --git a/.gitignore b/.gitignore index 68bc17f..459c313 100644 --- a/.gitignore +++ b/.gitignore @@ -158,3 +158,5 @@ cython_debug/ # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ +sso/local_settings.py +sso/local_settings/local_settings.py diff --git a/sso/local_settings/__init__.py b/sso/local_settings/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/sso/local_settings/local_settings.example.py b/sso/local_settings/local_settings.example.py new file mode 100644 index 0000000..2ab2ff5 --- /dev/null +++ b/sso/local_settings/local_settings.example.py @@ -0,0 +1,30 @@ +""" +Django settings for dashboard project. + +Generated by 'django-admin startproject' using Django 4.0.3. + +For more information on this file, see +https://docs.djangoproject.com/en/4.0/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/4.0/ref/settings/ +""" +import environ +import os + +env = environ.Env() + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +# A new SECRET_KEY can be generated by running the following command: +# openssl rand -hex 32 +SECRET_KEY = "django-insecure-44zt@)$td7_yh(01q^hrce%h(311n!djn%%#s1b7$cvfy!pf7y" + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + +print("Finished importing local_settings.ci.py") diff --git a/sso/settings.py b/sso/settings.py index c31137b..b4093d2 100644 --- a/sso/settings.py +++ b/sso/settings.py @@ -135,3 +135,11 @@ OAUTH2_PROVIDER = { "openid": "OpenID Connect scope", }, } + +try: + from .local_settings.local_settings import * + + print("Found local_settings") +except ModuleNotFoundError: + print("No local_settings available, using defaults") + pass