视图.py
someForm = SomeForm(request.POST)
...
someForm.customSave(request.user)
表格.py
class SomeForm(ModelForm):
class Meta:
model = Some
def customSave(self,user):
lv = self.save(commit=False)
lv.created_by = user
lv.save()
如何获取我刚刚保存的模型(或模型)的 ID someForm
?