Oh Django, how do I love thee? Let me count the joins ...
Let's say I have three simple models - news articles, their categories, and the table that defines which articles are in which categories:
Read More
class Article(models.Model): title = models.CharField(max_length=40, unique=True) body = models.TextField() class Category(models.Model): name = models.CharField(max_length=40, unique=True) class ArticleCategory(models.Model): article = models.ForeignKey(Article) category = models.ForeignKey(Category)
To get ...Read More

