Re: "Raw query must include the primary key" when inheriting models

2014-10-30 Thread Collin Anderson
Hi Tobias, Based on your database query, it looks like you are not doing multiple table inheritance, but your models are set up for multiple table inheritance. https://docs.djangoproject.com/en/dev/topics/db/models/#model-inheritance Why not just have a status field on your Campaign model? Djan

"Raw query must include the primary key" when inheriting models

2014-10-29 Thread Tobias Wolff
Hi, I have created two models as this: | classCampaign(models.Model): name =models.CharField(max_length=255) classCampaignExt(Campaign): status =models.IntegerField() | In my APIView I do this: | defget(self,request,campaign_id,response_format=None): campaigns =CampaignExt.ob