Skip to content

Commit

Permalink
added: settings.py
Browse files Browse the repository at this point in the history
  • Loading branch information
chem1sto committed Jun 20, 2024
1 parent a4a4c9f commit 785d3be
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions api_yamdb/api_yamdb/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@

from dotenv import load_dotenv

load_dotenv(os.path.join(os.path.dirname(__file__), '.env'))
load_dotenv(os.path.join(os.path.dirname(__file__), '.env.db'))

BASE_DIR = Path(__file__).resolve().parent.parent

load_dotenv(BASE_DIR.parent / '.env')
load_dotenv(BASE_DIR.parent / '.env.db')

SECRET_KEY = os.getenv('SECRET_KEY',
default='p&l%385148kslhtyn^##a1)ilz@4zqj=rq&agdol^##zgl9(vs')

DEBUG = os.getenv('DEBUG', default='False') == 'True'

DB_NAME = os.getenv('DB_NAME')

ALLOWED_HOSTS = os.getenv('ALLOWED_HOSTS',
default='127.0.0.1, localhost').split(', ')

Expand Down

0 comments on commit 785d3be

Please sign in to comment.