17
I have a django model like so:
class Profile_Tag(models.Model):
profile = models.ForeignKey(Profile)
tag = models.ForeignKey(Tag)
and a view like so:
pts = Profile_Tag.objects.all()
for pt in pts:
print pt.profile.id
is there any way to access the profile foreignKey without hitting the database each time? I don't want to query the profile table. I just want to grab the ids from the Profile_Tag table.