摘要:
本讲介绍数据库多对多关系,代码样例继前文使用。一,在 blog/models.py 中创建对象:# Many-To-Many Example : Authors vs Booksclass Author(models.Model): name = models.CharField(max_length=20) def __unicode__(self): return self.nameclass Book(models.Model): name = models.CharField(max_length=20) authors = models.Many... 阅读全文
posted @ 2013-10-12 23:00
exclm
阅读(969)
评论(0)
推荐(0)
浙公网安备 33010602011771号