From 1f102890d6da3d0a330c6bce5c652f747cec222f Mon Sep 17 00:00:00 2001 From: Michael Wood Date: Wed, 4 Nov 2015 14:54:41 +0000 Subject: bitbake: toaster: orm make CustomImageRecipe inherit from Recipe This allows us to re-use the properties of a recipe for the custom image recipes as well as re-using the existing templates and logic that deals with recipe objects. (Bitbake rev: bb8120b56be7eee6ed2e4434d8477282a01e0c00) Signed-off-by: Michael Wood Signed-off-by: brian avery Signed-off-by: Richard Purdie --- bitbake/lib/toaster/orm/models.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'bitbake/lib') diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index 37f78d7102..d1245463ab 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py @@ -1383,16 +1383,11 @@ class ProjectLayer(models.Model): class Meta: unique_together = (("project", "layercommit"),) -class CustomImageRecipe(models.Model): +class CustomImageRecipe(Recipe): search_allowed_fields = ['name'] - name = models.CharField(max_length=100) - base_recipe = models.ForeignKey(Recipe) - packages = models.ManyToManyField(Package) + base_recipe = models.ForeignKey(Recipe, related_name='based_on_recipe') project = models.ForeignKey(Project) - class Meta: - unique_together = ("name", "project") - class ProjectVariable(models.Model): project = models.ForeignKey(Project) name = models.CharField(max_length=100) -- cgit v1.2.3-54-g00ecf