(self, data_dict)
Feed a block from a block dict.
Feed a block from a block dict.
Feed a block from a block dict .
def from_dict(self, data_dict):
        """Feed a block from a block dict."""
        props = data_dict.get('componentProps', {})
        view_dict = props.get('view')
        if not view_dict:
            raise TypeError('View not defined')

        self._view_id = view_dict.get('id', 0)
        self._view_name = view_dict.get('name', '')
def from_dict ( self , data_dict ) : props = data_dict . get ( 'componentProps' , { } ) view_dict = props . get ( 'view' ) if not view_dict : raise TypeError ( 'View not defined' ) self . _view_id = view_dict . get ( 'id' , 0 ) self . _view_name = view_dict . get ( 'name' , '' )