class host(models.Model):
emp = models.ForeignKey(getname)
def __unicode__(self):
return self.topic
In views there is the code as,
real =[]
for emp in my_emp:
real.append(host.objects.filter(emp=emp.id))
This above results only the values of emp,My question is that how to get the ids along with emp values.
Thanks..