Given a Widget instance (*not* a Widget class), returns a dictionary of
        any HTML attributes that should be added to the Widget, based on this
        Field.

def widget_attrs(self, widget):
        """
        Given a Widget instance (*not* a Widget class), returns a dictionary of
        any HTML attributes that should be added to the Widget, based on this
        Field.
        """
        attrs = {}
        if getattr(self, "min_value", None) is not None:
            attrs['min'] = self.min_value
        if getattr(self, "max_value", None) is not None:
            attrs['max'] = self.max_value
        return attrs