我有一份工作机会的管理表格。要查看该提议的所有工作回复,我的表格如下所示:
class JobOfferAdminDisplayable(BaseTranslationModelAdmin):
model = JobOffer
inlines = [JobResponseInline,]
class JobResponseInline(TabularDynamicInlineAdmin):
model = JobResponse
但我不知道如何测试它......试图在后查询中包含模型的属性+管理表单数据,但它不起作用
response = self.client.post(self.url, {"title_fr" : 'title', 'form-TOTAL_FORMS': '2', 'form-INITIAL_FORMS': '1',"form-MAX_NUM_FORMS" : '2', "status" : 2, "email" :'email@email.fr', "type":'internship'})
此查询生成以下错误:
django.core.exceptions.ValidationError: ['ManagementForm data is missing or has been tampered with']