[Django]-Access instance passed to ModelForm from clean(self) method

55👍

In a ModelForm, the instance is accessible via self.instance

self.instance.first == self.cleaned_data.get("second")

http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#overriding-the-clean-method

Leave a comment