Re: Foreign key Real world use case Q

2010-12-26 Thread Emmanuel Mayssat
Wrong model definition!!! you need a many to many or a one to many relationship. In your current model, you have one to one relationship. class Article(models.Model): headline = models.CharField(max_length=100) publications = models.ManyToManyField(Publication) http://www.djangoproject.co

Foreign key Real world use case Q

2010-12-26 Thread rahul jain
Foriegn Key Use case Class Item(): desc = models.StringFrield() Class Menu(): type = models.StringField(default = "Italian") ///cuisine type item_list = models.ForiegnKey(Item) So for each cuisine I have some list of items for ex: menu type 1 for ex have 5 items (it