views_ajax.py 文件源码

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

项目:djk-sample 作者: Dmitri-Sintsov 项目源码 文件源码
def get_row_str_fields(self, obj, row=None):
        str_fields = super().get_row_str_fields(obj, row)
        if str_fields is None:
            str_fields = {}
        # Add formatted display of virtual field.
        is_plural = pluralize(row['exists_days'], arg='days')
        str_fields['exists_days'] = '{} {}'.format(row['exists_days'], 'day' if is_plural == '' else is_plural)
        return str_fields
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号