mirror of
https://git.isptech.ru/ISPsystem/isp-maintenance.git
synced 2025-09-13 18:43:09 +02:00
Add: core cli, lazy_group, example apps
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from settings.environment import BASE_DIR
|
||||
from settings.general import BASE_DIR
|
||||
|
||||
from settings.platform import (
|
||||
PLATFORM_TYPE,
|
||||
|
@@ -2,18 +2,21 @@ from settings.environment import env
|
||||
from settings.platform import PLATFORM_CONFIG
|
||||
|
||||
|
||||
#! Required because some instance use psql db:
|
||||
# ! Required because some instance use psql db:
|
||||
DB_ENGINE = env.str(
|
||||
'DB_ENGINE',
|
||||
PLATFORM_CONFIG.get('DatabaseType', 'mysql')
|
||||
)
|
||||
|
||||
# Connection parameters:
|
||||
DB_HOST = env.str('DB_HOST', 'mysql')
|
||||
DB_HOST = env.str(
|
||||
'DB_HOST',
|
||||
PLATFORM_CONFIG.get('DatabaseType', 'mysql')
|
||||
)
|
||||
DB_PORT = env.int('DB_PORT', 3306)
|
||||
DB_USER = env.str('DB_USER', 'root')
|
||||
|
||||
#! Do not pass password on production. Use value from config.json
|
||||
# ! Do not pass password on production. Use value from config.json
|
||||
DB_PASSWORD = env.str(
|
||||
'DB_PASSWORD',
|
||||
PLATFORM_CONFIG.get('MysqlRootPassword', '')
|
||||
|
@@ -1,11 +1,6 @@
|
||||
import pathlib
|
||||
from environs import Env
|
||||
|
||||
|
||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||
BASE_DIR = pathlib.Path(__file__).resolve().parent.parent
|
||||
|
||||
|
||||
# Init environment:
|
||||
env = Env()
|
||||
|
||||
|
15
isp_maintenance/settings/general.py
Normal file
15
isp_maintenance/settings/general.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import pathlib
|
||||
|
||||
|
||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||
BASE_DIR = pathlib.Path(__file__).resolve().parent.parent
|
||||
|
||||
INSTALLED_APPS = {
|
||||
'vm6': {
|
||||
'access': 'apps.vm6.access.commands.cli',
|
||||
'nodes': 'apps.vm6.nodes.commands.cli',
|
||||
},
|
||||
'dci6': {
|
||||
'access': 'apps.dci6.access.commands.cli',
|
||||
},
|
||||
}
|
@@ -1,4 +1,5 @@
|
||||
from settings.environment import env, BASE_DIR
|
||||
from settings.environment import env
|
||||
from settings.general import BASE_DIR
|
||||
from utils.helpers import parse_json_file
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user