From nobody Thu Sep 19 00:57:22 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=patchew-devel-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 153136932212313.088614949397083; Wed, 11 Jul 2018 21:22:02 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 670A8307D84A; Thu, 12 Jul 2018 04:22:01 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5734B308BDAE; Thu, 12 Jul 2018 04:22:01 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 41BD64BB78; Thu, 12 Jul 2018 04:22:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w6C4LxmO020305 for ; Thu, 12 Jul 2018 00:21:59 -0400 Received: by smtp.corp.redhat.com (Postfix) id D52321001947; Thu, 12 Jul 2018 04:21:59 +0000 (UTC) Received: from mx1.redhat.com (ext-mx19.extmail.prod.ext.phx2.redhat.com [10.5.110.48]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CA78210018FB for ; Thu, 12 Jul 2018 04:21:58 +0000 (UTC) Received: from mail-pl0-f47.google.com (mail-pl0-f47.google.com [209.85.160.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 475EE307D844 for ; Thu, 12 Jul 2018 04:21:47 +0000 (UTC) Received: by mail-pl0-f47.google.com with SMTP id s24-v6so10104932plq.6 for ; Wed, 11 Jul 2018 21:21:47 -0700 (PDT) Received: from localhost.localdomain ([112.196.135.182]) by smtp.gmail.com with ESMTPSA id i12-v6sm31294658pgd.87.2018.07.11.21.21.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 11 Jul 2018 21:21:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=RH1eIL7Jv7JTQ1lSoNKB9XoKQaSww2z927LBOZFptVM=; b=neOolgA0akjaG+sYNy39eRfJ6tPMAOWJLFgCpEN56mZSj9BUHWwPOC/5Wy3LsknWuQ vkzqz3dQ45J3BUHOx/O+jYSlEiUTbeKwfgCxKmoZszmRDMsxy6X2Y7jFtnyaePAUfukR iXtoee23RUeK/uHx6ObRGq9xUhK+5/lkNcE0R7MsqJCWVe7gsKTYrz8y2UJV4NuDcMus VhdvuuUs3Ppq1YLllTo+kN9Jism2cZgo4vaEBTsa1GUcxWiilqk9I12zlrIjBUPVfGCo 0k1yC/jfURnYMwfSu0M6+esw1RgjdMMUVxbUf5kBS7O1UemSn9CyJGOJNEXIJEuWKXoV wr7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=RH1eIL7Jv7JTQ1lSoNKB9XoKQaSww2z927LBOZFptVM=; b=itLSWJHVamZB51is4QztlMeXWAem4EWBq94m1uvvn1RjHM8+ewos0PkBrNFPlxl58W n36lS9koTCU+q1PMsjQqnSfhb7/Db5lHIaPVdwpxyL2Gn0paMWJpCOLHfpJWtMicq6aU rvKHGYsVtw5JVT7KHJCuR4JCUyumWApDKXI7ygNRw8BIjj3RNCwBjCF0bsOCnKdILMXB gsK2fpokzDCeIU+OVGDhbVa5a4zWpVjAq7hsGvhIcD4R4hOG2W9s4+IZXvJHymjt7msV LgirKW/r3m9girQ1tVVp7hqnD/a2RUCEH0BZa8h0DMA1ANmCa6ZGE4oQSOMhtB8Hee9k ut3Q== X-Gm-Message-State: AOUpUlGp0PART8zKrRAigm74ENa9EhwuSFmRHZEmiST5q6bNN8b6VZES Dli49gyRqR1BPPpzqXFP4JHMqw== X-Google-Smtp-Source: AAOMgpezfdYZES7ldZGrkWVsdHrD1d/IstWJLawK7DYd0kUCCkG+D9WC1ou6VvgLQGT+QYqzNjOIug== X-Received: by 2002:a17:902:aa46:: with SMTP id c6-v6mr608146plr.313.1531369306351; Wed, 11 Jul 2018 21:21:46 -0700 (PDT) From: Shubham Jain To: patchew-devel@redhat.com Date: Thu, 12 Jul 2018 09:51:17 +0530 Message-Id: <20180712042120.2831-4-shubhamjain7495@gmail.com> In-Reply-To: <20180712042120.2831-1-shubhamjain7495@gmail.com> References: <20180712042120.2831-1-shubhamjain7495@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Thu, 12 Jul 2018 04:21:47 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Thu, 12 Jul 2018 04:21:47 +0000 (UTC) for IP:'209.85.160.47' DOMAIN:'mail-pl0-f47.google.com' HELO:'mail-pl0-f47.google.com' FROM:'shubhamjain7495@gmail.com' RCPT:'' X-RedHat-Spam-Score: 3.05 *** (DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_SORBS_WEB, SPF_PASS, T_DKIM_INVALID) 209.85.160.47 mail-pl0-f47.google.com 209.85.160.47 mail-pl0-f47.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.48 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: patchew-devel@redhat.com Cc: Shubham Jain Subject: [Patchew-devel] [PATCH v5 3/6] Add properties as model field X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Thu, 12 Jul 2018 04:22:01 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" While using legacy api in patchew-cli, get-projects is called in update whi= ch prepare a dictionary of projects using Project fields. In rest, properti= es was missing. --- api/models.py | 2 ++ api/rest.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/api/models.py b/api/models.py index e712149..e0c4fa2 100644 --- a/api/models.py +++ b/api/models.py @@ -196,6 +196,8 @@ class Project(models.Model): emit_event("SetProperty", obj=3Dself, name=3Dprop, value=3Dvalue, old_value=3Dold_val) =20 + properties =3D property(get_properties, set_property) =20 + def total_series_count(self): return Message.objects.series_heads(project=3Dself.name).count() =20 diff --git a/api/rest.py b/api/rest.py index 45dab6e..c9a131c 100644 --- a/api/rest.py +++ b/api/rest.py @@ -133,7 +133,7 @@ class ProjectSerializer(serializers.HyperlinkedModelSer= ializer): model =3D Project fields =3D ('resource_uri', 'name', 'mailing_list', 'prefix_tags',= 'url', 'git', \ 'description', 'display_order', 'logo', 'parent_project'= , 'messages', - 'results', 'series') + 'results', 'series', 'properties') =20 messages =3D HyperlinkedIdentityField(view_name=3D'messages-list', loo= kup_field=3D'pk', lookup_url_kwarg=3D'projects_pk') --=20 2.15.1 (Apple Git-101) _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel