(layout_uid=None, as_instance=False)
return layout_cls
Gets the layout by ``layout_uid`` given.

    If left empty, takes the default one chosen in settings.

    Raises a ``dash.exceptions.NoActiveLayoutChosen`` when no default layout
    could be found.

    :return dash.base.BaseDashboardLayout: Sublcass of
        ``dash.base.BaseDashboardLayout``.
Gets the layout by ``layout_uid`` given.
Gets the layout by layout_uid given .
def get_layout(layout_uid=None, as_instance=False):
    """Gets the layout by ``layout_uid`` given.

    If left empty, takes the default one chosen in settings.

    Raises a ``dash.exceptions.NoActiveLayoutChosen`` when no default layout
    could be found.

    :return dash.base.BaseDashboardLayout: Sublcass of
        ``dash.base.BaseDashboardLayout``.
    """
    ensure_autodiscover()

    if not layout_uid:
        layout_uid = ACTIVE_LAYOUT

    layout_cls = layout_registry.get(layout_uid, None)
    if not layout_cls:
        raise LayoutDoesNotExist(
            _("Layout `{0}` does not exist!").format(layout_uid)
        )

    if as_instance:
        return layout_cls()

    return layout_cls
def get_layout ( layout_uid = None , as_instance = False ) : ensure_autodiscover ( ) if not layout_uid : layout_uid = ACTIVE_LAYOUT layout_cls = layout_registry . get ( layout_uid , None ) if not layout_cls : raise LayoutDoesNotExist ( _ ( "Layout `{0}` does not exist!" ) . format ( layout_uid ) ) if as_instance : return layout_cls ( ) return layout_cls