createviews.py 文件源码

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

项目:django-postgresviews 作者: meric 项目源码 文件源码
def handle(self, *args, **options):
        validate = options.get('validate', False)
        force = options.get('force', False)
        app_config = apps.get_app_config('postgresviews')
        tables = {
            model._meta.db_table: model for model in apps.get_models()
        }

        for model in ViewBase.view_models:
            app_config.validate_view_model(model, tables)

        if validate:
            return

        if force:
            drop_views()

        create_views()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号