def add_placeholder_attrs(self, widget=None):
    if (widget is None):
        widget = self.widget
    placeholder = widget.attrs.get('placeholder', self.placeholder)
    if (placeholder and self.set_placeholder and is_widget_with_placeholder(widget)):
        widget.attrs['placeholder'] = placeholder
def add_placeholder_attrs(self, widget=None):
    if (widget is None):
        widget = self.widget
    placeholder = widget.attrs.get('placeholder', self.placeholder)
    if (placeholder and self.set_placeholder and is_widget_with_placeholder(widget)):
        widget.attrs['placeholder'] = placeholder