migrations.py 文件源码

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

项目:django-postgres-extra 作者: SectorLabs 项目源码 文件源码
def __init__(self):
        """Creates a new migration simulator with an empty
        project state and no migrations."""

        import psqlextra.apps

        self.app_label = self._generate_random_name()
        self.app_config = type(self.app_label, (AppConfig,), dict(
            name=self.app_label,
            verbose_name=self.app_label
        ))(self.app_label, psqlextra.apps)

        self.app_config.models = {}

        self.apps = Apps()
        self.apps.ready = False
        self.apps.populate(installed_apps=[self.app_config])

        self.project_state = ProjectState()
        self.migrations = []
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号