Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
实际上,我无法在我的迁移文件中正确导入 Masonite 的模型。我想创建预先注册的数据作为数据库种子。我怎样才能做到这一点?
在您的迁移目录中创建一个__init__.py文件并将其放入其中:
__init__.py
import os import sys sys.path.append(os.getcwd())