'Constructor
@param layout: the layout, or the config dict
@param widgets: the available widgets as dict {name: widget}
@param default: the default configuration (=list of widget configs)
@param configurable: whether this dashboard is user-configurable'

def __init__(self, layout, widgets=None, default=None, configurable=False):

    if isinstance(layout, dict):
        config = layout
        title = config.get('title', current.T('Dashboard'))
        layout = config.get('layout')
        widgets = config.get('widgets', widgets)
        default = config.get('default', default)
        configurable = config.get('configurable', configurable)
    self.config_id = None
    self.title = title
    if (layout is None):
        layout = self.DEFAULT_LAYOUT
    self.layout = layout
    if (not widgets):
        widgets = {}
    self.available_widgets = widgets
    if (not default):
        default = []
    self.active_widgets = default
    self.version = None
    self.next_id = 0
    self.configurable = configurable
    self.loaded = (True if (not configurable) else False)
