我用下面的代码替换了在第一个问题中显示的第一个代码块,从而解决了这个问题:
import pandas as pdfrom myapp.models import glossary_entrydef pour_entire_entry_model(): elements = glossary_entry.objects.all() for element in elements: entry = acquired_terminology.objects.create() entry.Lemma = element.Lemma entry.Acronym = element.Acronym entry.Definizione = element.Definizione # creates a tuple of the new object or # current object and a boolean of if it was created
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)