dav_base: cosmetics
Run tests / Execute tox to run the test suite (push) Successful in 3m29s

This commit is contained in:
2026-05-28 14:51:49 +02:00
parent efd2305b35
commit d9cfffb8c2
8 changed files with 63 additions and 41 deletions
@@ -3,7 +3,8 @@ from importlib.resources import files as resource_files
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from dav_base.config.modules import DJANGO_MAIN_MODULE, ModuleMeta
from dav_base.constants import DJANGO_MAIN_MODULE, MODULE_APP_SETTINGS_PREFIX
from dav_base.config.modules import ModuleMeta
class Command(BaseCommand):
@@ -22,7 +23,9 @@ class Command(BaseCommand):
if module_name in config.modules.keys():
raise CommandError('Module \'{}\' is already enabled'.format(module_name))
settings_file_name = 'settings-{}.py'.format(module_name)
settings_file_name = '{prefix}{module_name}.py'.format(prefix=MODULE_APP_SETTINGS_PREFIX,
module_name=module_name)
input_file = resource_files(module_name).joinpath('django_project_config', settings_file_name)
if input_file.is_file():
output_file = os.path.join(django_base_dir, django_main_module, settings_file_name)