From patchwork Wed Mar 13 06:56:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: andrepapoti X-Patchwork-Id: 1911546 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=BgYWgZ5y; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TvhDk3cztz1yWn for ; Wed, 13 Mar 2024 17:58:30 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=BgYWgZ5y; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4TvhDk2cQQz3vZ3 for ; Wed, 13 Mar 2024 17:58:30 +1100 (AEDT) X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=BgYWgZ5y; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::433; helo=mail-pf1-x433.google.com; envelope-from=andrepapoti@gmail.com; receiver=lists.ozlabs.org) Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4TvhCs47lHz3vZG for ; Wed, 13 Mar 2024 17:57:45 +1100 (AEDT) Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-6e46dcd8feaso3931273b3a.2 for ; Tue, 12 Mar 2024 23:57:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710313062; x=1710917862; darn=lists.ozlabs.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=juQqF0klGftRsHbzn/kCxw+Ibkfw18iXlS+il495OIM=; b=BgYWgZ5yZnZxEv3OyQG9/vt/L43+gRQCW21u72fCspapZzTFy6ngkco4TTM8dqs591 wuYV4JJb/nwBk64kcXKB1Hfat5fF1GaBUDmZskSCEUK6GTcq+WKvaB9Pm57vLxuXuN3R JpEUjELFjoHAHmiGI+I4lC98D/hedPVTe4NxFm8bzk4x0YscgSaxV6K3/r340hxRNkwZ 3ma1H6jARSirTk/wQe9vsgOpKPnJizsvkPsvtsQxes0vQ/aIVbv/rGTwcbMpvF2+VjV9 i/EG6tub2eE4MBXgGKZtOEgsaRBI4Cylv/vHx+S6xlp/KgEJgkiGyB0AiZQHlz2yD2uc IwJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710313062; x=1710917862; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=juQqF0klGftRsHbzn/kCxw+Ibkfw18iXlS+il495OIM=; b=JB4yG/j9LnZ88l6RWqq6yFIwCaWXXNMIi6xMqa+8ZgWSCtA7Y0bLezdUBWNwNwB8t+ O1/DGeTptzVgRLhAbj1MfQN9OC3f/aYXr8IbknmBv14mvQ1jmGQv46c58zgJk3R3exV9 oM9NnlelOvJAOTAhuNHE5Z00cY0ndjQlX+NaZ4Sx1Xz+qt1OvEIAOHVNegBiJytigx62 qoKh3z+9KyzgfchYJjDcK+UBRXZRpM5naNZoRA0TT18wNKpRNLujIeWxHMvsWuvq1obt +We/BrcL/TL+91IVvcRr//Wy8Ykh2nGn9N3A7GB4W2BwCm+kisI4zLSoIU3jMg6klVa0 hmgw== X-Gm-Message-State: AOJu0YzCto2NE8BmoK1LBLApuskONfd2mWcrdRxuaezpnQWIigqwpUt8 MiB5Jl/F+3Yjbq7pnmtX8RZgmnNMfHFYupbhDtMlT7DuIeqnhUkt9PU/W4Mz X-Google-Smtp-Source: AGHT+IG6MOoruqN95MC0YkKF+qYyFVfI+cnaSvI7HzgghFG8GjrZ8XUujB6J02oc1FdDgZFFL8XcuQ== X-Received: by 2002:a05:6a00:842:b0:6e5:3b8e:bb6b with SMTP id q2-20020a056a00084200b006e53b8ebb6bmr2179291pfk.7.1710313062589; Tue, 12 Mar 2024 23:57:42 -0700 (PDT) Received: from localhost.localdomain ([2804:1b3:a4c0:b1de:3ec4:883:9cca:f0a7]) by smtp.gmail.com with ESMTPSA id le21-20020a056a004fd500b006e691787eaesm4843998pfb.34.2024.03.12.23.57.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 23:57:42 -0700 (PDT) From: andrepapoti To: patchwork@lists.ozlabs.org Subject: [PATCH 7/9] admin: Add Note admin Date: Wed, 13 Mar 2024 03:56:39 -0300 Message-ID: <20240313065642.385843-7-andrepapoti@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240313065642.385843-1-andrepapoti@gmail.com> References: <20240313065642.385843-1-andrepapoti@gmail.com> MIME-Version: 1.0 X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" Signed-off-by: andrepapoti --- patchwork/admin.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/patchwork/admin.py b/patchwork/admin.py index d3bf8d2..6ac9183 100644 --- a/patchwork/admin.py +++ b/patchwork/admin.py @@ -13,6 +13,7 @@ from patchwork.models import Check from patchwork.models import Cover from patchwork.models import CoverComment from patchwork.models import DelegationRule +from patchwork.models import Note from patchwork.models import Patch from patchwork.models import PatchComment from patchwork.models import PatchRelation @@ -130,6 +131,15 @@ class PatchCommentAdmin(admin.ModelAdmin): admin.site.register(PatchComment, PatchCommentAdmin) +class NoteAdmin(admin.ModelAdmin): + list_display = ('patch', 'submitter', 'last_modified') + search_fields = ('patch__name', 'submitter__name', 'submitter__email') + date_hierarchy = 'last_modified' + + +admin.site.register(Note, NoteAdmin) + + class PatchInline(admin.StackedInline): model = Patch extra = 0