I have a models class class A(models.Model): user = models.ForeignKey(User)
Now if I do a a = A.objects.get(pk = something_existing); print a.__dict__
, user
is not in __dict__
. a.user
however doesnot give an attribute error.
So when is the actual user being calculated? I looked in django.db.models.base.Model
and django.db.models.base.ModelBase
classes and they do not override __getattr__
, (which I guessed might be being done), so where is this calculated/populated.