Accessing Values of a ForeignKey or OneToOne object in ModelForm

Posted by theactiveactor on Stack Overflow See other posts from Stack Overflow or by theactiveactor
Published on 2010-06-05T21:17:51Z Indexed on 2010/06/05 21:22 UTC
Read the original article Hit count: 179

Filed under:

I have a ModelFormA for ModelA, which has a one-one relationship with ModelB and foreign-key relationship with ModelC.

Inside ModelFormA, I can access attributes of the current ModelA instance via self.cleaned_data["colA-1"]. How would I access attributes of ModelB or ModelC?

© Stack Overflow or respective owner

Related posts about django