From patchwork Thu Mar 16 22:07:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 740037 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vkjKZ0yZyz9ryQ for ; Fri, 17 Mar 2017 09:08:34 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=that.guru header.i=@that.guru header.b="Ri9322Ox"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3vkjKY6kyxzDqYY for ; Fri, 17 Mar 2017 09:08:33 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=that.guru header.i=@that.guru header.b="Ri9322Ox"; dkim-atps=neutral X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Received: from relay112.mymailcheap.com (relay112.mymailcheap.com [185.19.31.29]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3vkjK15F8LzDqZf for ; Fri, 17 Mar 2017 09:08:05 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=that.guru header.i=@that.guru header.b="Ri9322Ox"; dkim-atps=neutral Received: from relay101.mymailcheap.com (relay101.mymailcheap.com [159.100.249.66]) by relay112.mymailcheap.com (Postfix) with ESMTPS id A31C0123F3 for ; Thu, 16 Mar 2017 22:08:02 +0000 (UTC) Received: from relay1007.mymailcheap.com (relay1007.mymailcheap.com [149.56.98.132]) by relay101.mymailcheap.com (Postfix) with ESMTPS id C967E121A8 for ; Thu, 16 Mar 2017 22:07:58 +0000 (UTC) Received: from filter1001.mymailcheap.com (filter1001.mymailcheap.com [158.69.67.251]) by relay1007.mymailcheap.com (Postfix) with ESMTPS id 5F95C1E03F for ; Thu, 16 Mar 2017 18:07:53 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by filter1001.mymailcheap.com (Postfix) with ESMTP id 9238320BB4 for ; Thu, 16 Mar 2017 22:07:54 +0000 (UTC) Authentication-Results: filter1001.mymailcheap.com; dkim=permerror reason="key not found" header.d=that.guru header.i=@that.guru header.b=Ri9322Ox; dkim-adsp=none (unprotected policy); dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at filter1001.mymailcheap.com Received: from filter1001.mymailcheap.com ([127.0.0.1]) by localhost (filter1001.mymailcheap.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ah6pJ3lK9WQI for ; Thu, 16 Mar 2017 22:07:49 +0000 (UTC) Received: from one.mxroute.com (one-outgoing.mxroute.com [23.92.70.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by filter1001.mymailcheap.com (Postfix) with ESMTPS for ; Thu, 16 Mar 2017 22:07:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=that.guru; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=uF0N65aSaUatPesiSA5IQ2LdJXXaxhXIKLyP1PFftSg=; b=Ri9322Oxu/2J4yghxLuo5HZ2Sg lQ1KJsu/0oTAbMaCd57l04/WMlUiYRziDnLqDRShsO7b2vW+ff/0WojkhaWgpSysftJpBWL2Tx4iX p74eZBdw2aC4SlVeqzNCFWPSk2yiaMswzIC9k1VW2o2HDoyHCC4MnbYITAoeVyRPLz3qsh6q0awyn HRyt3vIRBXszbNSJgHOkRkVTWwAWp7ZSmA6HEIJzlQQzxVARM3uTMeUTAhiYrpe9LkUT98z4E3lTX VPee0/8oak6vIonTwljCri3WLdHRtw9zfWM8p85w3QYJTQYxiwMp0e90P8SUNiTF2DGyO8Miz0ysK HUZqMi0g==; From: Stephen Finucane To: patchwork@lists.ozlabs.org Subject: [PATCH v3 2/5] models: Add 'mbox_url' permalink for bundles Date: Thu, 16 Mar 2017 22:07:25 +0000 Message-Id: <20170316220728.10817-3-stephen@that.guru> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170316220728.10817-1-stephen@that.guru> References: <20170316220728.10817-1-stephen@that.guru> X-OutGoing-Spam-Status: No, score=-10.0 X-AuthUser: stephen@that.guru X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" We're going to use this for downloading mboxes via the REST API. Signed-off-by: Stephen Finucane Reviewed-by: Andy Doan --- patchwork/models.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/patchwork/models.py b/patchwork/models.py index 94aaa0f..199c118 100644 --- a/patchwork/models.py +++ b/patchwork/models.py @@ -741,6 +741,11 @@ class Bundle(models.Model): 'bundlename': self.name, }) + @models.permalink + def get_mbox_url(self): + return ('bundle-mbox', (), {'bundlename': self.name, + 'username': self.owner.username}) + class Meta: unique_together = [('owner', 'name')]