def set_widget_text_block(widget, text, view=None, pval=None, pval_id=None): if widget.parametisation: if view: pval = view.parameter_value_set(param=widget.parametisation) elif pval_id: pval = ParameterValue.objects.get(pk=pval_id) else: pval = None wdata = widget.widget_data(pval=pval) if not wdata: wdata = WidgetData(widget=widget,param_value=pval) wdata.text_block = text wdata.save()
def set_widget_text_block(widget, text, view=None, pval=None, pval_id=None): if widget.parametisation: if view: pval = view.parameter_value_set(param=widget.parametisation) elif pval_id: pval = ParameterValue.objects.get(pk=pval_id) else: pval = None wdata = widget.widget_data(pval=pval) if not wdata: wdata = WidgetData(widget=widget, param_value=pval) wdata.text_block = text wdata.save()
def set_widget_actual_frequency_display_text(widget, display_text, view=None, pval=None, pval_id=None): if widget.parametisation: if view: pval = view.parameter_value_set(param=widget.parametisation) elif pval_id: pval = ParameterValue.objects.get(pk=pval_id) else: pval = None wdata = widget.widget_data(pval=pval) if not wdata: wdata = WidgetData(widget=widget,param_value=pval) wdata.actual_frequency_text = display_text wdata.save()
def set_widget_actual_frequency_display_text(widget, display_text, view=None, pval=None, pval_id=None): if widget.parametisation: if view: pval = view.parameter_value_set(param=widget.parametisation) elif pval_id: pval = ParameterValue.objects.get(pk=pval_id) else: pval = None wdata = widget.widget_data(pval=pval) if not wdata: wdata = WidgetData(widget=widget, param_value=pval) wdata.actual_frequency_text = display_text wdata.save()