Missing method of django.forms.widgets.Widget class.
171557
def get_context(self, name, value, attrs):
        """"""
        context = {}
        context['widget'] = {
            'name': name,
            'type': 'text',
            'is_hidden': self.is_hidden,
            'required': self.is_required,
            'value': self.format_value(value),
            'attrs': {**self.attrs, **(attrs or {})},
            'template_name': self.template_name,
        }
        return context
157333
def get_form_class(self):
        
        if self.fieldsets:
            fields = flatten_fieldsets(self.get_fieldsets())
        else:
            if (self.form_class and
                    getattr(self.form_class, 'Meta', None) and
                    getattr(self.form_class.Meta, 'fields', None)):
                fields = self.form_class.Meta.fields
            else:
                fields = []

        exclude = None
        if self.parent_field:
            exclude = (self.parent_field,)

        readonly_fields = self.get_readonly_fields()
        if readonly_fields:
            if exclude:
                exclude = list(exclude)
            else:
                exclude = []

            for field in readonly_fields:
                try:
                    try:
                        f = self.model._meta.get_field(field)
                        if fields:
                            fields.remove(field)
                        else:
                            exclude.append(field)
                    except models.FieldDoesNotExist:
                        if fields:
                            fields.remove(field)
                except ValueError:
                    pass

        params = {'fields': fields or '__all__',
                  'exclude': exclude,
                  'formfield_callback': self.formfield_for_dbfield}

        if self.form_class:
            if issubclass(self.form_class, forms.ModelForm) and \
                    getattr(self.form_class._meta, 'model', None):
                model = self.form_class.Meta.model
            else:
                model = self.model
            fc = self.customize_form_widgets(self.form_class, fields=fields)
            params['form'] = fc
        else:
            if self.model is not None:
                # If a model has been explicitly provided, use it
                model = self.model
            elif hasattr(self, 'object') and self.object is not None:
                # If this view is operating on a single object, use
                # the class of that object
                model = self.object.__class__
            else:
                # Try to get a queryset and extract the model class
                # from that
                model = self.get_queryset().model

        return model_forms.modelform_factory(model, **params)
50334
def create_widget(self):
        
        d = self.declaration
        self.widget = EditText(self.get_context(), None,
                               d.style or "@attr/editTextStyle")
259288
def get_form(self, form_class):
        """"""
        if not hasattr(self, '_form'):
            kwargs = self.get_form_kwargs()
            self._form = form_class(instance=self.object, **kwargs)
        return self._form
764269
def widget(self, which_viz='viz'):
    '''
    
    '''
    if hasattr(self, 'widget_class') == True:

      # run clustering if necessary
      if len(self.viz['row_nodes']) == 0:
        self.cluster()

      self.widget_instance = self.widget_class(network = self.export_viz_to_widget(which_viz))

      return self.widget_instance
    else:
      print('Can not make widget because Network has no attribute widget_class')
      print('Please instantiate Network with clustergrammer_widget using: Network(clustergrammer_widget)')
769561
def create_widget(self):
        
        d = self.declaration
        self.widget = FloatingActionButton(self.get_context(), None, d.style)
932957
def method_missing(method, *args, &block)
      return super unless @template.respond_to? method
      # Delegate the method so that we don't come in here the next time
      # when same method is called
      self.class.delegate method, to: :@template
      @template.public_send method, *args, &block
    end
1260547
def setWidget(self, widget, index=0, row=None,
                  col=0, rowspan=1, colspan=1):
        
        if row is None:
            row = self.currentRow
        self.currentRow = max(row + 1, self.currentRow)
        if index > len(self.widgets) - 1:
            # add new widget
            self.widgets.append(widget)
        else:  # change existing widget
            self.layout.removeWidget(self.widgets[index])
            self.widgets[index] = widget
        self.layout.addWidget(widget, row, col, rowspan, colspan)
        self.raiseOverlay()
87568
def create_widget(self):
        
        d = self.declaration
        self.widget = View(self.get_context(), None, d.style)
146248
def widgets(self):
        """"""
        w = []
        for i in range(self.count()):
            w.append(self.widget(i))
        return w
1139974
function createWidget(widgetType, value, description) {

        // Create the widget model.
        return manager.new_model({
            model_module: '@jupyter-widgets/controls',
            model_name: widgetType + 'Model',
            model_id: 'widget-1'
        // Create a view for the model.
        }).then(function(model) {
            console.log(widgetType + ' model created');

            model.set({
                description: description || '',
                value: value,
            });

            return  manager.create_view(model);
        }, console.error.bind(console))
        .then(function(view) {
            console.log(widgetType + ' view created');
            manager.display_view(null, view);
            return view;
        }, console.error.bind(console));
    }
504329
def get_widget(self, request):
        
        return self._update_widget_choices(self.field.formfield(widget=RestrictedSelectWidget).widget)
726423
def create_widget(self):
        
        d = self.declaration
        self.widget = ToggleButton(self.get_context(), None,
                                   d.style or "@attr/buttonStyleToggle")
1137732
def refreshWidgets(self):
        
        if hasattr(self, '_widgets'):
            for w in self._widgets:
                w.refresh(isauto=0)
        else:
            raise RuntimeError("No widgets found")
422408
def get_all_widget_classes():
    
    from leonardo.module.web.models import Widget
    _widgets = getattr(settings,
                       'WIDGETS', Widget.__subclasses__())
    widgets = []
    if isinstance(_widgets, dict):
        for group, widget_cls in six.iteritems(_widgets):
            widgets.extend(widget_cls)
    elif isinstance(_widgets, list):
        widgets = _widgets
    return load_widget_classes(widgets)
841808
protected <W extends Widget> W widget(WidgetFactory<W> factory,
      WidgetInitializer<W> initializers) {
    return widget(get(0), factory, initializers);
  }
706936
def set_widgets(self):
        """"""
        self.clear_further_steps()
        purpose = self.parent.step_kw_purpose.selected_purpose()['name']
        subcategory = self.parent.step_kw_subcategory.\
            selected_subcategory()['name']
        self.lstClassifications.clear()
        self.lblDescribeClassification.setText('')
        self.lblSelectClassification.setText(
            classification_question % (subcategory, purpose))
        classifications = self.classifications_for_layer()
        for classification in classifications:
            if not isinstance(classification, dict):
                classification = definition(classification)
            item = QListWidgetItem(
                classification['name'],
                self.lstClassifications)
            item.setData(QtCore.Qt.UserRole, classification['key'])
            self.lstClassifications.addItem(item)

        # Set values based on existing keywords (if already assigned)
        classification_keyword = self.parent.get_existing_keyword(
            'classification')
        if classification_keyword:
            classifications = []
            for index in range(self.lstClassifications.count()):
                item = self.lstClassifications.item(index)
                classifications.append(item.data(QtCore.Qt.UserRole))
            if classification_keyword in classifications:
                self.lstClassifications.setCurrentRow(
                    classifications.index(classification_keyword))

        self.auto_select_one_item(self.lstClassifications)