This commit is contained in:
1 parent
7da9fa3d14
commit
02bd680383
6 files changed
+22
-18
No files matched your search
+11
-6
@@ -1,18 +1,23 @@
|
||||
from datetime import timedelta
|
||||
from dotenv import load_dotenv
|
||||
import os
|
||||
dotenv_path = os.path.join(os.path.dirname(__file__), '.env')
|
||||
load_dotenv(dotenv_path)
|
||||
class Settings():
|
||||
def __init__(self) -> None:
|
||||
|
||||
self.secret_key='V7bvDZMztr3EU8S9g1Dipw'
|
||||
self.redis_hosts = [("127.0.0.1", 6379)]
|
||||
self.access_token_lifetime = timedelta(minutes=480)
|
||||
self.refresh_token_lifetime = timedelta(days=1)
|
||||
self.db = {
|
||||
'default':{
|
||||
'ENGINE': 'django.db.backends.mysql',
|
||||
'NAME': 'accounting',
|
||||
'USER': 'root',
|
||||
'PASSWORD': 'Vojn1389',
|
||||
'HOST': '127.0.0.1',
|
||||
'PORT': '3306',
|
||||
'ENGINE': str(os.getenv('ENGINE')),
|
||||
'NAME': str(os.getenv('DBNAME')),
|
||||
'USER': str(os.getenv('USER')),
|
||||
'PASSWORD': str(os.getenv('PASSWORD')),
|
||||
'HOST': str(os.getenv('HOST')),
|
||||
'PORT': str(os.getenv('PORT')),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user