Refactor: split code into several django apps (we call them modules).

This commit is contained in:
2018-12-13 14:47:58 +01:00
parent c23dc33d4e
commit 0d5a8c65e3
81 changed files with 739 additions and 332 deletions

View File

@@ -0,0 +1,18 @@
from django.conf import settings
from django.core.management.base import BaseCommand
class Command(BaseCommand):
help = 'Disable a modular app from django-dav installation.'
def add_arguments(self, parser):
parser.add_argument('module')
def handle(self, *args, **options):
module_name = options['module']
config = settings.MODULE_CONFIG
del config.modules[module_name]
config.save()
self.stdout.write(self.style.SUCCESS('Module \'{}\' disabled.'.format(module_name)))