models.py 文件源码

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

项目:valhalla 作者: LCOGT 项目源码 文件源码
def as_dict(self):
        ret_dict = model_to_dict(self)
        ret_dict['target'] = self.target.as_dict
        ret_dict['molecules'] = [m.as_dict for m in self.molecules.all()]
        ret_dict['location'] = self.location.as_dict
        ret_dict['constraints'] = self.constraints.as_dict
        ret_dict['windows'] = [w.as_dict for w in self.windows.all()]
        return ret_dict
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号