views.py 文件源码

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

项目:portailva 作者: BdEINSALyon 项目源码 文件源码
def value_for(self, association):
        value = str(self.prefix)
        try:
            if self.prop:
                val = str(eval("association."+self.prop))
            else:
                val = str(self.value)

            if 'accents' in self.options:
                val = ''.join((c for c in unicodedata.normalize('NFD', val) if unicodedata.category(c) != 'Mn'))
            if 'caps' in self.options:
                val = val.upper()

            return value + val

        except AttributeError:
            return ''
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号