hi group, class Parent(models.Model): user = models.ForeignKey(User,unique=True) school=models.ForeignKey(School) def __unicode__(self): return self.user.username
class Student(models.Model): user = models.ForeignKey(User,unique=True) school=models.ForeignKey(School) standard=models.ForeignKey(Standard) class StudentParent(models.Model): student=models.ForeignKey(Student) parent = models.ForeignKey(Parent) In template,with help of student object I tried to retrieve parent name like {{studentobj.studentparent__parent}} but this could not fetch me the result .please correct me. A simpler way could be to place the parent foreignkey in student table ,but for learning point of view i need to know why do I couldn't hook parent name with the above Thanks ganesh -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=.