Hi all,
from a model object, I can get a related object shortcut,
using the name of the foreign key field:
>>> m1 = Mailbox.objects.get(pk=38)
>>> str(m1.localdomainfk)
'
framailx.de'
But if I have the foreign key field instead of its name,
I can only get the pk of the related object:
>>> f1 = Mailbox._meta.get_field(‚localdomainfk')
>>> f1.value_from_object(m1)
7
Can anybody show me, how to get the related object
shortcut, if I have only the local object and the foreign key field?
Axel
-—
PGP-Key:29E99DD6 ☀ computing @ chaos claudius