Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 60A04E00BC4; Tue, 8 Dec 2015 13:17:35 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.220.54 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 4940FE00B5A for ; Tue, 8 Dec 2015 13:16:45 -0800 (PST) Received: by pacwq6 with SMTP id wq6so17730837pac.1 for ; Tue, 08 Dec 2015 13:16:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=E6JC/1z8fWL8qwAxn9+cxbhVcxbsIc0WuvQUnx41FnU=; b=B2TcGl0b3Azm/mrBrq51mdE96PoxCR9bsw8yWvKz67UTL2/aZZa1aIun6VuB8zZsiF /VCZz7pZJ0udiW3G7X7Gu6XMlgSZX90Pc72gQCstviGmRf/L5kCeIh8Ta5teeCpdkQPJ kpmUPhINHTtJSYuRXCrSzjsEybPIT4oXCuCuv37Fm3ZVmzhpwZ/KcQmz/GpUhK5RLMow D7T0vK2tGXxj2IpDFeAma3HBIIYjlgImuOWQrBm9OvmVN2JbHytC33SLGqzHYUk67oJr MGSQ/XEoC99BeZLWyW1gdQJXKbRTAxwZ5xMLHySLO8W+czLYoGV6nJchJBKXgKU36Tk0 MNcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=E6JC/1z8fWL8qwAxn9+cxbhVcxbsIc0WuvQUnx41FnU=; b=eb8S7wpJqzGMbb7Jkh8k2h6aFQ2IszC7b38PBJs91qwdl834i1BSDlj4KTuyY2j8/1 ACVPnnEEQyJ5pN0Sh9I8i9wmKzI1BTPHO6TIaGOKBux9JTAsD8sTdWJe59b0K2qlNp7N PGog4oBSB5izgUWaKUjU03X78yHYWdpWvRFtdlN+j61FNxr5m+a0OBnuiTgHhpLZ1fz1 qNNqJu/1+mvvs+bo93MHJeJs+vY/x3vIxcgrmkmknpD5Ajtn0lD2cqBFXXHwKXZTllYl f0hJKvexwPLaN5UPmTwXlQJa5a23w15ObetBp1/JlB4vTmL/wrfOOPzsPsVXxHB4WI6i 6wRQ== X-Gm-Message-State: ALoCoQmDjyKcSqFgXfgFtwbA3ZidCGdQJD2oG1frFc5WUbMLAZo5G16GC+dDrBXPzTYnnDDIxW51tcK9bR+2ST37IjyuKwkB4g== X-Received: by 10.66.119.237 with SMTP id kx13mr2979519pab.158.1449609405617; Tue, 08 Dec 2015 13:16:45 -0800 (PST) Received: from draco.ger.corp.intel.com ([192.55.54.40]) by smtp.gmail.com with ESMTPSA id v64sm6675766pfi.50.2015.12.08.13.16.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 08 Dec 2015 13:16:44 -0800 (PST) From: Michael Wood To: toaster@yoctoproject.org Date: Tue, 8 Dec 2015 21:15:52 +0000 Message-Id: <1449609380-11073-7-git-send-email-michael.g.wood@intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1449609380-11073-1-git-send-email-michael.g.wood@intel.com> References: <1449609380-11073-1-git-send-email-michael.g.wood@intel.com> Subject: [PATCH 06/34] toaster: orm make CustomImageRecipe inherit from Recipe X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2015 21:17:35 -0000 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. Signed-off-by: Michael Wood --- bitbake/lib/toaster/orm/models.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index 10f1cce..debe6fa 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py @@ -1243,16 +1243,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) -- 2.1.4