python
insert_list =[]
for i in range(10000):
name=f"{i} "
insert_list.append(MyModel(name=name))
MyModel.objects.bulk_create(insert_list)
注明:创建的是对象
insert_list =[]
for i in range(10000):
name=f"{i} "
insert_list.append(MyModel(name=name))
MyModel.objects.bulk_create(insert_list)
注明:创建的是对象