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 <michael.g.wood@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Michael Wood 2015-11-04 14:54:41 +00:00 committed by Richard Purdie
parent 648753b30d
commit 1f102890d6
1 changed files with 2 additions and 7 deletions

View File

@ -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)