mongo 中有一个现有的集合,称为students. 有没有办法让我不必为所有字段键入架构并直接从集合中导入所有字段?
class Student(DynamicDocument):
meta = {'collection': 'students'}
name = StringField() # I want to avoid writing this for all the fields in the collection
rollNo = IntField()
address = StringField()
Run Code Online (Sandbox Code Playgroud)