Retrieve Data from Database

41 views
Skip to first unread message

Madhu

unread,
Jul 24, 2012, 3:00:02 AM7/24/12
to django...@googlegroups.com
Hi!
I am new in django, i want to get the table from one table also want the some content from another table.
Can anybody tell me how it should be done?

My module class structure is as below

class A(models.Model):
    name =models.CharField(max_length=100)
    content = models.CharField(max_length=100)
    B = models.ForeignKey(B)

class B(models.Model):
   details =models.CharField(max_length=100)

i want to display the details from table A as name, content also wants to display details from table B.

Daniel Roseman

unread,
Jul 24, 2012, 4:39:06 AM7/24/12
to django...@googlegroups.com
What, exactly, are you having trouble with? What have you tried?

I see you also commented on a three-year-old post of mine answering a very similar question. What about that answer did not help you?
--
DR.
Reply all
Reply to author
Forward
0 new messages