(app_or_model_label)
return specified_apps, specified_models
:param app_or_model_label: list of app labels ("app_label.model_name" or "app_label")
    :return: Tuple containing two sets: Set of AppConfigs, Set of model classes
:param app_or_model_label: list of app labels ("app_label.model_name" or "app_label")
    :return: Tuple containing two sets: Set of AppConfigs, Set of model classes
: param app_or_model_label : list of app labels ( app_label . model_name or app_label ) : return : Tuple containing two sets : Set of AppConfigs Set of model classes
def get_apps_and_models(app_or_model_label):
    """
    :param app_or_model_label: list of app labels ("app_label.model_name" or "app_label")
    :return: Tuple containing two sets: Set of AppConfigs, Set of model classes
    """
    specified_apps = set()
    specified_models = set()
    for label in app_or_model_label:
        if '.' in label:
            try:
                model = apps.get_model(label)
            except LookupError:
                raise DomainDumpError('Unknown model: %s' % label)
            specified_models.add(model)
        else:
            try:
                app_config = apps.get_app_config(label)
            except LookupError:
                from corehq.util.couch import get_document_class_by_doc_type
                from corehq.util.exceptions import DocumentClassNotFound
                # ignore this if it's a couch doc type
                try:
                    get_document_class_by_doc_type(label)
                except DocumentClassNotFound:
                    raise DomainDumpError('Unknown app in excludes: %s' % label)
            specified_apps.add(app_config)
    return specified_apps, specified_models
def get_apps_and_models ( app_or_model_label ) : specified_apps = set ( ) specified_models = set ( ) for label in app_or_model_label : if '.' in label : try : model = apps . get_model ( label ) except LookupError : raise DomainDumpError ( 'Unknown model: %s' % label ) specified_models . add ( model ) else : try : app_config = apps . get_app_config ( label ) except LookupError : from corehq . util . couch import get_document_class_by_doc_type from corehq . util . exceptions import DocumentClassNotFound # ignore this if it's a couch doc type try : get_document_class_by_doc_type ( label ) except DocumentClassNotFound : raise DomainDumpError ( 'Unknown app in excludes: %s' % label ) specified_apps . add ( app_config ) return specified_apps , specified_models