dict-server/settings.py

51 lines
1.2 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from pydantic.v1 import BaseSettings
TORTOISE_ORM = {
'connections': {
"default": "mysql://local_admin:enterprise@127.0.0.1:3306/dict",
"production": "mysql://local_admin:enterprise@127.0.0.1:3306/prod_db",
},
'apps': {
'models': {
'models': [
'app.models.base',
'app.models.fr',
'app.models.jp',
'aerich.models' # aerich自带模型类必须填入
],
'default_connection': 'default',
}
},
'use_tz': False,
'timezone': 'Asia/Shanghai'
}
ONLINE_SETTINGS = {
'connections': {
'default': 'mysql://root:@127.0.0.1:3306/test_db',
},
'apps': {
'models': {
'models': [
'app.models.base',
'app.models.fr',
'app.models.jp',
'aerich.models' # aerich自带模型类必须填入
],
'default_connection': 'default',
}
},
'use_tz': False,
'timezone': 'Asia/Shanghai'
}
class Settings(BaseSettings):
USE_OAUTH = False
SECRET_KEY = "asdasdasd-odjfnsodfnosidnfdf-0oq2j01j0jf0i1ej0fij10fd"
settings = Settings()