fields.py 文件源码

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

项目:django-tsvector-field 作者: damoti 项目源码 文件源码
def _check_columns_attribute(self, textual_columns):
        if not self.columns:
            return
        if not textual_columns:
            yield checks.Error(
                "No textual columns available in this model for search vector indexing.",
                obj=self, id='postgres.E100',
            )
        elif not is_iterable(self.columns) or \
                not all(isinstance(wc, WeightedColumn) for wc in self.columns):
            yield checks.Error(
                "'columns' must be an iterable containing WeightedColumn instances",
                obj=self, id='postgres.E101',
            )
        else:
            for column in self.columns:
                for error in column.check(self, textual_columns):
                    yield error
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号