4👍
✅
The first one – somealert.contact.pk
– will get the Contact object. The second – somealert.contact_id
– won’t.
You can verify this in the shell by looking at the contents of django.db.connection.queries
.
Source:stackexchange.com