diff --git a/dashboard/local_settings.example.py b/dashboard/local_settings.example.py index 48163a4..9736fd3 100644 --- a/dashboard/local_settings.example.py +++ b/dashboard/local_settings.example.py @@ -9,11 +9,6 @@ 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/ @@ -31,21 +26,25 @@ ALLOWED_HOSTS = [] # https://docs.djangoproject.com/en/4.0/ref/settings/#databases DATABASES = { - "default": env.db_url( - "DATABSE_URL", default="postgres://postgres:password@localhost:5432/postgres" - ) + "default": { + "ENGINE": "django.db.backends.postgresql", + "NAME": "postgres", + "USER": "postgres", + "PASSWORD": "password", + "HOST": "localhost", + "PORT": "5432", + } } - ## django-payments configuration PAYMENT_HOST = "http://localhost:8000" PAYMENT_VARIANTS = { "stripe": ( - "payments.stripe.StripeProvider", # please don't change this + "payments.stripe.StripeProvider", # please don't change this { - "secret_key": env.get_value("STRIPE_SECRET_KEY"), - "public_key": env.get_value("STRIPE_PUBLIC_KEY"), + "secret_key": "", + "public_key": "", }, ) } @@ -78,6 +77,11 @@ HOSTEA = { }, } -EMAIL_CONFIG = env.email("EMAIL_URL", default="smtp://admin:password@localhost:10025") - -vars().update(EMAIL_CONFIG) +# Please see EMAIL_* configuration options: +# https://docs.djangoproject.com/en/4.1/ref/settings/#email-host +EMAIL_HOST = "localhost" +EMAIL_USE_TLS = False +EMAIL_USE_SSL = False +EMAIL_PORT = 10025 +EMAIL_HOST_USER = "admin" +EMAIL_HOST_PASSWORD = "password" diff --git a/dashboard/settings.py b/dashboard/settings.py index 70570dc..03aa88a 100644 --- a/dashboard/settings.py +++ b/dashboard/settings.py @@ -9,13 +9,8 @@ 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 - from pathlib import Path -env = environ.Env() - # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent @@ -86,9 +81,14 @@ WSGI_APPLICATION = "dashboard.wsgi.application" # https://docs.djangoproject.com/en/4.0/ref/settings/#databases DATABASES = { - "default": env.db_url( - "DATABSE_URL", default="postgres://postgres:password@localhost:5432/postgres" - ) + "default": { + "ENGINE": "django.db.backends.postgresql", + "NAME": "postgres", + "USER": "postgres", + "PASSWORD": "password", + "HOST": "localhost", + "PORT": "5432", + } } @@ -118,7 +118,7 @@ LANGUAGE_CODE = "en-us" TIME_ZONE = "UTC" -# not yet implemented so disabling as it provides performance benefits +# not yet implemented so disabling as it provides performance benefits # ref: https://docs.djangoproject.com/en/4.0/topics/i18n/translation/ USE_I18N = False @@ -157,8 +157,8 @@ PAYMENT_VARIANTS = { "stripe": ( "payments.stripe.StripeProvider", { - "secret_key": env.get_value("STRIPE_SECRET_KEY", default=""), - "public_key": env.get_value("STRIPE_PUBLIC_KEY", default=""), + "secret_key": "", + "public_key": "", }, ) } @@ -192,9 +192,15 @@ HOSTEA = { }, } -EMAIL_CONFIG = env.email("EMAIL_URL", default="smtp://admin:password@localhost:10025") +# Please see EMAIL_* configuration options: +# https://docs.djangoproject.com/en/4.1/ref/settings/#email-host +EMAIL_HOST = "localhost" +EMAIL_USE_TLS = False +EMAIL_USE_SSL = False +EMAIL_PORT = 10025 +EMAIL_HOST_USER = "admin" +EMAIL_HOST_PASSWORD = "password" -vars().update(EMAIL_CONFIG) try: import dashboard.local_settings