form.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:py-script 作者: xiaoxiamin 项目源码 文件源码
def render(self):
        x = '<span>'
        for arg in self.args:
            if isinstance(arg, (tuple, list)):
                value, desc= arg
            else:
                value, desc = arg, arg 
            attrs = self.attrs.copy()
            attrs['name'] = self.name
            attrs['type'] = 'radio'
            attrs['value'] = value
            if self.value == value:
                attrs['checked'] = 'checked'
            x += '<input %s/> %s' % (attrs, net.websafe(desc))
        x += '</span>'
        return x
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号