view.py
someForm = SomeForm(request.POST)
...
someForm.customSave(request.user)
forms.py
class SomeForm(ModelForm):
class Meta:
model = Some
def customSave(self,user):
lv = self.save(commit=False)
lv.created_by = user
lv.save()
How can I get the id of the model (or the model) I have just saved from someForm?
Since the behavior of ModelForm.save is to return the instance, you might want to return the instance in your customSave method
then you can access the pk or id on the instance