示例#1
0
文件: get_apps.py 项目: httpdss/deam
    def handle(self, app_name = '', *args, **options): #IGNORE:W0221
        """
        external apps command handler
        """
        deam_config = {}
        if hasattr(settings, 'DEAM_CONFIG'):
            deam_config = settings.DEAM_CONFIG
        apps_manager = AppsManager(
            get_project_root(),
            deam_config,
        )

        get_all_apps = options.get('get_all_apps', False)
        list_apps = options.get('list_apps', False)

        if app_name:
            apps_manager.download_app(app_name)

        if get_all_apps:
            apps_manager.download_app()
        elif list_apps:
            apps_manager.list_external_apps()
        elif not app_name:
            print "Missing params"
示例#2
0
 def __init__(self):
     """
     Constructor for the wsgi generator
     """
     BaseCommand.__init__(self)
     self.apps_manager = AppsManager(get_project_root())