From patchwork Sun Jun 24 19:55:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 933975 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41DNQb0qdmz9ry1 for ; Mon, 25 Jun 2018 05:58:15 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=that.guru 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="AifODIC9"; 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 41DNQZ6QSnzF14l for ; Mon, 25 Jun 2018 05:58:14 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=that.guru 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="AifODIC9"; dkim-atps=neutral X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=none (mailfrom) smtp.mailfrom=that.guru (client-ip=23.83.214.30; helo=caracal.maple.relay.mailchannels.net; envelope-from=stephen@that.guru; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=that.guru 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="AifODIC9"; dkim-atps=neutral Received: from caracal.maple.relay.mailchannels.net (caracal.maple.relay.mailchannels.net [23.83.214.30]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 41DNNJ1x34zF15H for ; Mon, 25 Jun 2018 05:56:15 +1000 (AEST) X-Sender-Id: 5xi41l16bi|x-authuser|stephen@that.guru Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 55466281B3F for ; Sun, 24 Jun 2018 19:56:13 +0000 (UTC) Received: from one.mxroute.com (unknown [100.96.28.18]) (Authenticated sender: 5xi41l16bi) by relay.mailchannels.net (Postfix) with ESMTPA id BD9FC281B31 for ; Sun, 24 Jun 2018 19:56:11 +0000 (UTC) X-Sender-Id: 5xi41l16bi|x-authuser|stephen@that.guru Received: from one.mxroute.com (one-outgoing.mxroute.com [172.19.36.153]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.15.2); Sun, 24 Jun 2018 19:56:13 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: 5xi41l16bi|x-authuser|stephen@that.guru X-MailChannels-Auth-Id: 5xi41l16bi X-Zesty-Tank: 4f847e69398a60dd_1529870171971_1013656076 X-MC-Loop-Signature: 1529870171971:3736124603 X-MC-Ingress-Time: 1529870171971 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=tYZNfotUcYPUVTTYEvyQP8J3u/OwFMsuk2XKYkR0U6U=; b=AifODIC9yo510SUPLvnuPLCbW6 2hPqm7DF7NlkQ2l9nHUgjtkY4gWbUvTV3W63F06YgYqHXbK56tncsmdH0WNncKXjCOHzfb3VRWfWO wMaNMpinwl8FQMaEOjzGbo5xy4IQr+FJwSm3e6IqQOy2LDE5MOwVkhxHdPtx4v2ZR1pXL2zXCVn7t CdK32xQS3ZeZ9nISeQWmZu2XTHxSSWi125urvCN0Izz5g8jRWanP9NtP5X5uhMhC3snx2KblJHybG JiYmPeSXTY0MjGuAtUtoV3UAw7b8sg++RaSt4mlv7VBfOxffWleQ1h1aEY7yfSbW4PpEtQTDcH5N6 cz9BbwKQ==; From: Stephen Finucane To: patchwork@lists.ozlabs.org Subject: [PATCH 06/11] Prepare for Django 2.0 Date: Sun, 24 Jun 2018 20:55:52 +0100 Message-Id: <20180624195557.19909-6-stephen@that.guru> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180624195557.19909-1-stephen@that.guru> References: <20180624195557.19909-1-stephen@that.guru> X-AuthUser: stephen@that.guru X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.26 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" Two changes necessary. - Remove 'SessionAuthenticationMiddleware' from settings https://docs.djangoproject.com/en/2.0/releases/2.0/#miscellaneous - Replace 'render_to_response' with 'render' https://docs.djangoproject.com/en/2.0/releases/2.0/#miscellaneous Both of these are supported by Django 1.11 so there's no need for compat wrappers. Signed-off-by: Stephen Finucane --- patchwork/settings/base.py | 1 - patchwork/views/cover.py | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/patchwork/settings/base.py b/patchwork/settings/base.py index 99eb3c06..acfb0164 100644 --- a/patchwork/settings/base.py +++ b/patchwork/settings/base.py @@ -32,7 +32,6 @@ MIDDLEWARE = [ 'django.contrib.admindocs.middleware.XViewMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', - 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', ] TIME_ZONE = 'Australia/Canberra' diff --git a/patchwork/views/cover.py b/patchwork/views/cover.py index f18a262f..aada6834 100644 --- a/patchwork/views/cover.py +++ b/patchwork/views/cover.py @@ -21,7 +21,7 @@ from django.http import Http404 from django.http import HttpResponse from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 -from django.shortcuts import render_to_response +from django.shortcuts import render from django.urls import reverse from patchwork.models import CoverLetter @@ -45,7 +45,7 @@ def cover_detail(request, cover_id): 'project': cover.project, } - return render_to_response('patchwork/submission.html', context) + return render(request, 'patchwork/submission.html', context) def cover_mbox(request, cover_id):