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 = []
评论列表
文章目录