(dashboard_entries)
return {'js': media_js, 'css': media_css}
Collect the widget media for dashboard entries given.

    :param iterable dashboard_entries: Iterable of
        ``dash.models.DashboardEntry`` instances.
    :return dict: Returns a dict containing the 'js' and 'css' keys.
        Correspondent values of those keys are lists containing paths to the
        CSS and JS media files.
Collect the widget media for dashboard entries given.
Collect the widget media for dashboard entries given .
def collect_widget_media(dashboard_entries):
    """Collect the widget media for dashboard entries given.

    :param iterable dashboard_entries: Iterable of
        ``dash.models.DashboardEntry`` instances.
    :return dict: Returns a dict containing the 'js' and 'css' keys.
        Correspondent values of those keys are lists containing paths to the
        CSS and JS media files.
    """
    media_js = []
    media_css = []
    for dashboard_entry in dashboard_entries:
        widget_cls = plugin_widget_registry.get(
            PluginWidgetRegistry.namify(
                dashboard_entry.layout_uid,
                dashboard_entry.placeholder_uid,
                dashboard_entry.plugin_uid
            )
        )
        if widget_cls:
            media_js += widget_cls.media_js
            media_css += widget_cls.media_css
        else:
            logger.debug(
                "widget_cls empty for dashboard "
                "entry {0}".format(dashboard_entry.__dict__)
            )
    return {'js': media_js, 'css': media_css}
def collect_widget_media ( dashboard_entries ) : media_js = [ ] media_css = [ ] for dashboard_entry in dashboard_entries : widget_cls = plugin_widget_registry . get ( PluginWidgetRegistry . namify ( dashboard_entry . layout_uid , dashboard_entry . placeholder_uid , dashboard_entry . plugin_uid ) ) if widget_cls : media_js += widget_cls . media_js media_css += widget_cls . media_css else : logger . debug ( "widget_cls empty for dashboard " "entry {0}" . format ( dashboard_entry . __dict__ ) ) return { 'js' : media_js , 'css' : media_css }