__init__.py 文件源码

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

项目:djanoDoc 作者: JustinChavez 项目源码 文件源码
def db_parameters(self, connection):
        """
        Extension of db_type(), providing a range of different return
        values (type, checks).
        This will look at db_type(), allowing custom model fields to override it.
        """
        data = DictWrapper(self.__dict__, connection.ops.quote_name, "qn_")
        type_string = self.db_type(connection)
        try:
            check_string = connection.data_type_check_constraints[self.get_internal_type()] % data
        except KeyError:
            check_string = None
        return {
            "type": type_string,
            "check": check_string,
        }
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号