()
Sync the registered plugin list with data in
    ``dash.models.DashboardPlugin``.
Sync the registered plugin list with data in
    ``dash.models.DashboardPlugin``.
Sync the registered plugin list with data in dash . models . DashboardPlugin .
def sync_plugins():
    """Sync the registered plugin list with data in
    ``dash.models.DashboardPlugin``.
    """
    # If not in restricted mode, the quit.

    if not RESTRICT_PLUGIN_ACCESS:
        return

    registered_plugins = set(get_registered_plugin_uids())

    synced_plugins = set([obj.plugin_uid for obj in
                          DashboardPlugin._default_manager.only('plugin_uid')])

    non_synced_plugins = registered_plugins - synced_plugins

    if not non_synced_plugins:
        return

    buf = []

    for plugin_uid in non_synced_plugins:
        buf.append(DashboardPlugin(plugin_uid=plugin_uid))

    DashboardPlugin._default_manager.bulk_create(buf)
def sync_plugins ( ) : # If not in restricted mode, the quit. if not RESTRICT_PLUGIN_ACCESS : return registered_plugins = set ( get_registered_plugin_uids ( ) ) synced_plugins = set ( [ obj . plugin_uid for obj in DashboardPlugin . _default_manager . only ( 'plugin_uid' ) ] ) non_synced_plugins = registered_plugins - synced_plugins if not non_synced_plugins : return buf = [ ] for plugin_uid in non_synced_plugins : buf . append ( DashboardPlugin ( plugin_uid = plugin_uid ) ) DashboardPlugin . _default_manager . bulk_create ( buf )