diff --git a/config.example.py b/config.example.py index e69de29..d3091b4 100644 --- a/config.example.py +++ b/config.example.py @@ -0,0 +1,5 @@ +SECRET_KEY = 'xinxl8xx#j$)#5h#pbv3knyyq2d6o%j125rx==e7vz*#wsd32w' + +DEBUG = True + +ALLOWED_HOSTS = [] \ No newline at end of file diff --git a/tldtest/settings.py b/tldtest/settings.py index dc7908e..a65ef3e 100644 --- a/tldtest/settings.py +++ b/tldtest/settings.py @@ -21,12 +21,12 @@ BASE_DIR = Path(__file__).resolve().parent.parent # See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = 'xinxl8xx#j$)#5h#pbv3knyyq2d6o%j125rx==e7vz*#wsd32w' +SCRET_KEY = config.SECRET_KEY # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True +DEBUG = config.DEBUG -ALLOWED_HOSTS = [] +ALLOWED_HOSTS = config.ALLOWED_HOSTS # Application definition @@ -122,7 +122,10 @@ USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/3.1/howto/static-files/ -STATIC_URL = 'https://static.tldtest.net/' +if DEBUG is True: + STATIC_URL = "static/" +else: + STATIC_URL = 'https://static.tldtest.net/' STATIC_ROOT = BASE_DIR / "staticfiles" STATICFILES_DIRS = [