Add: core cli, lazy_group, example apps

This commit is contained in:
2024-02-11 03:01:18 +09:00
parent c8c7060201
commit c776632195
13 changed files with 142 additions and 15 deletions

View File

@@ -1,4 +1,4 @@
from settings.environment import BASE_DIR
from settings.general import BASE_DIR
from settings.platform import (
PLATFORM_TYPE,

View File

@@ -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', '')

View File

@@ -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()

View 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',
},
}

View File

@@ -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