(request, domain, couch_user, project)
instantiate all UITabs, and aggregate all their TabClassErrors (if any)
    into a single TabClassErrorSummary

    this makes it easy to get a list of all configuration issues
    and fix them in one cycle
instantiate all UITabs, and aggregate all their TabClassErrors (if any)
    into a single TabClassErrorSummary
instantiate all UITabs and aggregate all their TabClassErrors ( if any ) into a single TabClassErrorSummary
def get_all_tabs(request, domain, couch_user, project):
    """
    instantiate all UITabs, and aggregate all their TabClassErrors (if any)
    into a single TabClassErrorSummary

    this makes it easy to get a list of all configuration issues
    and fix them in one cycle

    """
    all_tabs = []
    instantiation_errors = []
    tab_classes = list(MENU_TABS)
    tab_classes.extend(uitab_classes())
    for tab_class in tab_classes:
        try:
            tab = tab_class(
                request, domain=domain,
                couch_user=couch_user, project=project)
        except TabClassError as e:
            instantiation_errors.append(e)
        else:
            all_tabs.append(tab)

    if instantiation_errors:
        messages = (
            '- {}: {}'.format(e.__class__.__name__, str(e))
            for e in instantiation_errors
        )
        summary_message = 'Summary of Tab Class Errors:\n{}'.format('\n'.join(messages))
        raise TabClassErrorSummary(summary_message)
    else:
        return all_tabs
def get_all_tabs ( request , domain , couch_user , project ) : all_tabs = [ ] instantiation_errors = [ ] tab_classes = list ( MENU_TABS ) tab_classes . extend ( uitab_classes ( ) ) for tab_class in tab_classes : try : tab = tab_class ( request , domain = domain , couch_user = couch_user , project = project ) except TabClassError as e : instantiation_errors . append ( e ) else : all_tabs . append ( tab ) if instantiation_errors : messages = ( '- {}: {}' . format ( e . __class__ . __name__ , str ( e ) ) for e in instantiation_errors ) summary_message = 'Summary of Tab Class Errors:\n{}' . format ( '\n' . join ( messages ) ) raise TabClassErrorSummary ( summary_message ) else : return all_tabs