For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
+import os
import environ
-import dj_database_url
from pathlib import Path
env = environ.Env(
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
+environ.Env.read_env(os.path.join(BASE_DIR, '.env'))
+
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/
# Database
# https://docs.djangoproject.com/en/3.2/ref/settings/#databases
DATABASES = dict()
-DATABASES['default'] = dj_database_url.config(conn_max_age=600)
-
+DATABASES['default'] = env.db()
# Password validation
# https://docs.djangoproject.com/en/3.2/ref/settings/#auth-password-validators
-
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',