Refactor: split code into several django apps (we call them modules).
This commit is contained in:
17
dav_base/management/commands/list_modules.py
Normal file
17
dav_base/management/commands/list_modules.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from django.conf import settings
|
||||
from django.core.management.base import BaseCommand
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'List enabled modular apps in django-dav installation.'
|
||||
|
||||
def add_arguments(self, parser):
|
||||
pass
|
||||
|
||||
def handle(self, *args, **options):
|
||||
paragraphs = []
|
||||
config = settings.MODULE_CONFIG
|
||||
for obj in config.modules.values():
|
||||
paragraphs.append(str(obj))
|
||||
output = '\n'.join(paragraphs)
|
||||
self.stdout.write(output)
|
||||
Reference in New Issue
Block a user