registry.py 文件源码

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

项目:trydjango18 作者: wei0104 项目源码 文件源码
def run_checks(self, app_configs=None, tags=None, include_deployment_checks=False):
        """ Run all registered checks and return list of Errors and Warnings.
        """
        errors = []
        checks = self.get_checks(include_deployment_checks)

        if tags is not None:
            checks = [check for check in checks
                      if hasattr(check, 'tags') and set(check.tags) & set(tags)]

        for check in checks:
            new_errors = check(app_configs=app_configs)
            assert is_iterable(new_errors), (
                "The function %r did not return a list. All functions registered "
                "with the checks registry must return a list." % check)
            errors.extend(new_errors)
        return errors
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号