[Django]-Can you access a Django Model "property" from it's ModelForm?


If your ModelForm was initialized with an instance of a Model, then you can access it through the instance attribute. From the ModelForm docs:

Also, a model form instance bound to a model object will contain a self.instance attribute that gives model form methods access to that specific model instance.


Leave a comment