cofigurate settings

This commit is contained in:
behruz-dev
2025-07-14 14:47:27 +05:00
parent a36cd4e452
commit 2040e43585
7 changed files with 51 additions and 15 deletions

18
config/env.py Normal file
View File

@@ -0,0 +1,18 @@
import os
import environ
environ.Env.read_env(os.path.join('.env'))
env = environ.Env(
DB_ENGINE=(str, 'django.db.backends.postgresql'),
DB_NAME=(str),
DB_USER=(str, 'postgres'),
DB_PASSWORD=(str),
DB_HOST=(str, 'localhost'),
DB_PORT=(int, 5432),
DEBUG=(bool, False),
ALLOWED_HOSTS=(list, ['localhost', '127.0.0.1']),
SECRET_KEY=(str)
)