From nobody Mon Sep 16 19:19:53 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 header.i=fam@euphon.net; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1543415746929732.2490536870652; Wed, 28 Nov 2018 06:35:46 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 939FF30820F3; Wed, 28 Nov 2018 14:35:45 +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 848AB705A2; Wed, 28 Nov 2018 14:35:45 +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 705FA3F6E4; Wed, 28 Nov 2018 14:35:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wASEZiW9031717 for ; Wed, 28 Nov 2018 09:35:44 -0500 Received: by smtp.corp.redhat.com (Postfix) id 4EB1C7A5D7; Wed, 28 Nov 2018 14:35:44 +0000 (UTC) Received: from mx1.redhat.com (ext-mx02.extmail.prod.ext.phx2.redhat.com [10.5.110.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3C59B611CA; Wed, 28 Nov 2018 14:35:44 +0000 (UTC) Received: from sender1.zoho.com.cn (sender2-op-o12.zoho.com.cn [163.53.93.243]) by mx1.redhat.com (Postfix) with ESMTP id EA362A53D0; Wed, 28 Nov 2018 14:35:39 +0000 (UTC) Received: from localhost.localdomain (123.112.65.99 [123.112.65.99]) by mx.zoho.com.cn with SMTPS id 1543415732493420.69054302699465; Wed, 28 Nov 2018 22:35:32 +0800 (CST) ARC-Seal: i=1; a=rsa-sha256; t=1543415736; cv=none; d=zoho.com.cn; s=zohoarc; b=Lx1Off+X8KkfPATpN5VTDjgUx8SpLG/IX9GVWB1iOQGJYrdnFutzZnjZzyK/FS6LDeOi3B1XIdpuirzO4PmqcTydd10qcdOfTduy+DGmALxAFFN0X1TnLBcszoId4/UjBfqaxKVSUtTQ0yXUavv3L928s/H79elaSShQkrOP7xo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com.cn; s=zohoarc; t=1543415736; h=Cc:Date:From:In-Reply-To:Message-ID:References:Subject:To:ARC-Authentication-Results; bh=Lb/Ehz+9V6eyJzGjno4ALyYoeizFX3Glvj1kPLLI1ck=; b=bitafd9GzRytYWBdsNi/L5GFq92cwhS47ELe/InhS+VVmhhgt32UIt2BZWp07Qtu6PJsrhSV5Xj5RTHvqbCvJ8fsIXtoHLp/k4ND07BUVgyxmWH6KRxF2yeE4A9OcwSUr6gVfc4hv8Ym2u+UOJVOFKMdGlAe4wJKBdyv1YNsGYQ= ARC-Authentication-Results: i=1; mx.zoho.com.cn; dkim=pass header.i=euphon.net; spf=pass smtp.mailfrom=fam@euphon.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1543415736; s=zoho; d=euphon.net; i=fam@euphon.net; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; l=1201; bh=Lb/Ehz+9V6eyJzGjno4ALyYoeizFX3Glvj1kPLLI1ck=; b=OpoNsKn4uvCOTE8Y5bd1GPNlP1vg/opKUEAbDGC4LwqEBBlEIeAgiKQYl06eSKVg ty3CJ/9kpsAzlzRzpMvYAWUE7tLIRsswzjRKmwTPo5J5bogbdjrjj4uGhxajUN1oqDX 7D5DtzaF4iSQygHc7gKPzoe2bPRUN74oXlMot7KA= From: Fam Zheng To: patchew-devel@redhat.com Date: Wed, 28 Nov 2018 22:34:55 +0800 Message-Id: <20181128143505.27730-3-fam@euphon.net> In-Reply-To: <20181128143505.27730-1-fam@euphon.net> References: <20181128143505.27730-1-fam@euphon.net> X-ZohoCNMailClient: External X-Greylist: Sender passed SPF test, ACL 238 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 28 Nov 2018 14:35:42 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 28 Nov 2018 14:35:42 +0000 (UTC) for IP:'163.53.93.243' DOMAIN:'sender2-op-o12.zoho.com.cn' HELO:'sender1.zoho.com.cn' FROM:'fam@euphon.net' RCPT:'' X-RedHat-Spam-Score: -0.101 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, SPF_PASS) 163.53.93.243 sender2-op-o12.zoho.com.cn 163.53.93.243 sender2-op-o12.zoho.com.cn X-Scanned-By: MIMEDefang 2.78 on 10.5.110.26 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: patchew-devel@redhat.com Cc: Fam Zheng Subject: [Patchew-devel] [PATCH v2 02/12] mod: Pass request in render_page_hook 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.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Wed, 28 Nov 2018 14:35:45 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Fam Zheng This will be useful soon to extract information from the request useful to generate mod content. Signed-off-by: Fam Zheng --- mods/footer.py | 2 +- www/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/footer.py b/mods/footer.py index a947253..048bbcb 100644 --- a/mods/footer.py +++ b/mods/footer.py @@ -30,6 +30,6 @@ The config is the raw HTML code to inject. name =3D "footer" default_config =3D _default_config =20 - def render_page_hook(self, context_data): + def render_page_hook(self, request, context_data): context_data.setdefault("footer", "") context_data["footer"] +=3D self.get_config_raw() diff --git a/www/views.py b/www/views.py index 2aae127..0dc146e 100644 --- a/www/views.py +++ b/www/views.py @@ -37,7 +37,7 @@ def try_get_git_head(): =20 def render_page(request, template_name, **data): data["patchew_version"] =3D settings.VERSION + try_get_git_head() - dispatch_module_hook("render_page_hook", context_data=3Ddata) + dispatch_module_hook("render_page_hook", request=3Drequest, context_da= ta=3Ddata) return render(request, template_name, context=3Ddata) =20 =20 --=20 2.17.2 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel