i have model like: class Record(models.Model): patient_id = models.IntegerField(primary_key=True) name = models.CharField(max_length=200) problem = models.CharField(max_length=500)
and class PatientHistory(models.Model): patient_id = models.ForeignKey(Record) date = models.DateField(auto_now_add=True) analysis = models.CharField(max_length=200) prescription = models.CharField(max_length=500) NOw if I want the joined content like.. if I want to display all the patients name, problem and the analysis history how do I do it? how do I pass it to templates? the relation could be: Record: 1, john, headache PatientHistory 1 ,26-7-01, infection, crocin 1, 27-8-10, swelling, antibiotic i want to show the related data in one template.. How do I do it? I am newbie in this from embedded background. so ne help welcome :) -- 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=en.