From patchwork Tue Sep 4 19:15:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 966058 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 ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 424c4s64J0z9s47 for ; Wed, 5 Sep 2018 05:16:13 +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="gI2oTnWa"; 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 424c4s4TX9zF37Z for ; Wed, 5 Sep 2018 05:16:13 +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="gI2oTnWa"; 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=185.234.75.6; helo=relay-direct6.mxroute.com; 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="gI2oTnWa"; dkim-atps=neutral Received: from relay-direct6.mxroute.com (relay-direct6.mxroute.com [185.234.75.6]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 424c4m6cyQzF378 for ; Wed, 5 Sep 2018 05:16:07 +1000 (AEST) Received: from filter002.mxroute.com (unknown [185.133.192.179]) by relay-direct7.mxroute.com (Postfix) with ESMTP id 3C89B3F935 for ; Tue, 4 Sep 2018 19:15:34 +0000 (UTC) Received: from one.mxroute.com (one.mxroute.com [195.201.59.211]) by filter002.mxroute.com (Postfix) with ESMTPS id 1D1573F04F for ; Tue, 4 Sep 2018 19:15:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=that.guru; s=default; h=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: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=wxX1pqQx8PE+TXl77wETIA/ZOL6YJljT/kHOnW+L/AU=; b=gI2oTnWaZ+DZdh6uY1cTVI4OS7 nMYm31veX8/sgPkOaSjRjyH4CozcA49xbkPgy5dB/aCxa+i1yOPbmpHRz/970Q3sgnwCleYfs2U/N SSAP07rvSFgaFmIfIUowoz0V2+yumU/RzTUN63QGfigm3vF4f7/9PSrdBk07cLrBj9KLx9NRhbmyp 00ijKWu987alMWdSYot7+J/mGO+I9GoyV1tI1OEU1ovuHwKHuXoSu/MGp5USXE2sK6f0Y0jn82sxH CuBKREgwbsWBPqg0RPKx0zyRvW+NduC49G4sYxfDSKlj1QAaCcrqXYxIixxwXipAsYZ0wivYpXrgo 0ai0yTgg==; From: Stephen Finucane To: patchwork@lists.ozlabs.org Subject: [PATCH] urls: Remove references to Django < 1.11 Date: Tue, 4 Sep 2018 20:15:28 +0100 Message-Id: <20180904191528.6588-1-stephen@that.guru> X-Mailer: git-send-email 2.17.1 X-AuthUser: stephen@that.guru X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.27 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" This was missed in the recent "add support for Django 2.0" series. Signed-off-by: Stephen Finucane --- patchwork/urls.py | 95 ++++++++++++++--------------------------------- 1 file changed, 28 insertions(+), 67 deletions(-) diff --git a/patchwork/urls.py b/patchwork/urls.py index 6b1ef511..eae94c82 100644 --- a/patchwork/urls.py +++ b/patchwork/urls.py @@ -87,75 +87,36 @@ urlpatterns = [ name='user-link'), url(r'^user/unlink/(?P[^/]+)/$', user_views.unlink, name='user-unlink'), -] - -# password change -if django.VERSION >= (1, 11): - urlpatterns += [ - url(r'^user/password-change/$', - auth_views.PasswordChangeView.as_view(), - name='password_change'), - url(r'^user/password-change/done/$', - auth_views.PasswordChangeDoneView.as_view(), - name='password_change_done'), - url(r'^user/password-reset/$', - auth_views.PasswordResetView.as_view(), - name='password_reset'), - url(r'^user/password-reset/mail-sent/$', - auth_views.PasswordResetDoneView.as_view(), - name='password_reset_done'), - url(r'^user/password-reset/(?P[0-9A-Za-z_\-]+)/' - r'(?P[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', - auth_views.PasswordResetConfirmView.as_view(), - name='password_reset_confirm'), - url(r'^user/password-reset/complete/$', - auth_views.PasswordResetCompleteView.as_view(), - name='password_reset_complete'), - ] -else: - urlpatterns += [ - url(r'^user/password-change/$', - auth_views.password_change, - name='password_change'), - url(r'^user/password-change/done/$', - auth_views.password_change_done, - name='password_change_done'), - url(r'^user/password-reset/$', - auth_views.password_reset, - name='password_reset'), - url(r'^user/password-reset/mail-sent/$', - auth_views.password_reset_done, - name='password_reset_done'), - url(r'^user/password-reset/(?P[0-9A-Za-z_\-]+)/' - r'(?P[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', - auth_views.password_reset_confirm, - name='password_reset_confirm'), - url(r'^user/password-reset/complete/$', - auth_views.password_reset_complete, - name='password_reset_complete'), - ] -# login/logout -if django.VERSION >= (1, 11): - urlpatterns += [ - url(r'^user/login/$', auth_views.LoginView.as_view( - template_name='patchwork/login.html'), - name='auth_login'), - url(r'^user/logout/$', auth_views.LogoutView.as_view( - next_page=reverse_lazy('project-list')), - name='auth_logout'), - ] -else: - urlpatterns += [ - url(r'^user/login/$', auth_views.login, - {'template_name': 'patchwork/login.html'}, - name='auth_login'), - url(r'^user/logout/$', auth_views.logout, - {'next_page': reverse_lazy('project-list')}, - name='auth_logout'), - ] + # password change + url(r'^user/password-change/$', + auth_views.PasswordChangeView.as_view(), + name='password_change'), + url(r'^user/password-change/done/$', + auth_views.PasswordChangeDoneView.as_view(), + name='password_change_done'), + url(r'^user/password-reset/$', + auth_views.PasswordResetView.as_view(), + name='password_reset'), + url(r'^user/password-reset/mail-sent/$', + auth_views.PasswordResetDoneView.as_view(), + name='password_reset_done'), + url(r'^user/password-reset/(?P[0-9A-Za-z_\-]+)/' + r'(?P[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', + auth_views.PasswordResetConfirmView.as_view(), + name='password_reset_confirm'), + url(r'^user/password-reset/complete/$', + auth_views.PasswordResetCompleteView.as_view(), + name='password_reset_complete'), + + # login/logout + url(r'^user/login/$', auth_views.LoginView.as_view( + template_name='patchwork/login.html'), + name='auth_login'), + url(r'^user/logout/$', auth_views.LogoutView.as_view( + next_page=reverse_lazy('project-list')), + name='auth_logout'), -urlpatterns += [ # registration url(r'^register/', user_views.register, name='user-register'),