我已经尝试了一切,但我无法将值形式传递给下面的 ContactCSVModel 的构造函数:
if request.method == 'POST':
form = ConfiguratorForm(data=request.POST)
# Try and import CSV
ContactCSVModel.import_data(data=file, form=form)
班级...
class ContactCSVModel(CsvModel, form):
first_name = CharField()
last_name = CharField()
company = CharField()
mobile = CharField()
group = DjangoModelField(Group)
contact_owner = DjangoModelField(User)
CsvModel 是 Django 适配器的一部分