def widget_attrs(self, widget):
attrs = {}<EOL>if getattr(self, "<STR_LIT>", None) is not None:<EOL><INDENT>attrs['<STR_LIT>'] = self.min_value<EOL><DEDENT>if getattr(self, "<STR_LIT>", None) is not None:<EOL><INDENT>attrs['<STR_LIT>'] = self.max_value<EOL><DEDENT>return attrs<EOL>
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.