From nobody Mon Sep 16 19:46:35 2024 Delivered-To: importer2@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=patchew-devel-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1601048891; cv=none; d=zohomail.com; s=zohoarc; b=VMhgpwNKk4ImZSkpLIhkvQNDJ6XOq2hLlZoYzVRno46a0HKfjrWK+3hjdbcBC2aD6jIoHuU70us3BqbsYPj3VRebtXRMlSxM3odRo2dg70L88ZNIrZssWm2cx1pdYjaBpUkjC0eUHEL7z8H4tVPApMQbKqBwPewfiL54yGqPwbU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601048891; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=EU0Lc/pi8GlIV857XWlQ4wbWJ0qOpFj2pYFkLtt65Is=; b=gbA5eKZa5P1UhULHqqwrY7u/3/WZokl8seJaHP3NTFl3hGdP2EFrhq44QTv5Qwgjn5+rcN3NmPY2GgzCqCbvaw37FUhpQcZ2a4RwKTh343k6qBJkiGEOLWeAU8ZVh+TsIptvylasVkMi53W8CbVKQa2mgwqkk6cGvvKMp9L6Zh0= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1601048891958627.8642480520488; Fri, 25 Sep 2020 08:48:11 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-437-49YZC8PEPjC4PeLVu4eQpA-1; Fri, 25 Sep 2020 11:48:07 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 81F151006708; Fri, 25 Sep 2020 15:48:06 +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 78BC655772; Fri, 25 Sep 2020 15:48:06 +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 6E24B8C7A2; Fri, 25 Sep 2020 15:48:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08PFjhZZ024642 for ; Fri, 25 Sep 2020 11:45:43 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9F7542157F24; Fri, 25 Sep 2020 15:45:43 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 98E432157F26 for ; Fri, 25 Sep 2020 15:45:40 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4F77718AE948 for ; Fri, 25 Sep 2020 15:45:40 +0000 (UTC) Received: from sender2-op-o12.zoho.com.cn (sender2-op-o12.zoho.com.cn [163.53.93.243]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-569-DpUEJuurPVa-k4L8rRgnmA-1; Fri, 25 Sep 2020 11:45:34 -0400 Received: from localhost (host109-159-73-6.range109-159.btcentralplus.com [109.159.73.6]) by mx.zoho.com.cn with SMTPS id 1601048725521660.8020526976037; Fri, 25 Sep 2020 23:45:25 +0800 (CST) X-MC-Unique: 49YZC8PEPjC4PeLVu4eQpA-1 X-MC-Unique: DpUEJuurPVa-k4L8rRgnmA-1 From: fam@euphon.net To: patchew-devel@redhat.com Message-ID: <20200925154243.685513-11-fam@euphon.net> Date: Fri, 25 Sep 2020 16:42:42 +0100 In-Reply-To: <20200925154243.685513-1-fam@euphon.net> References: <20200925154243.685513-1-fam@euphon.net> MIME-Version: 1.0 X-ZohoCNMailClient: External X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Mimecast-Spam-Signature: yes X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 08PFjhZZ024642 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 10/11] url: Use class based views for auth pages 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: , Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=patchew-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Fam Zheng To prepare to upgrade to django 3. --- www/urls.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/www/urls.py b/www/urls.py index c3de7ce..e90fd90 100644 --- a/www/urls.py +++ b/www/urls.py @@ -17,10 +17,17 @@ urlpatterns =3D [] dispatch_module_hook("www_url_hook", urlpatterns=3Durlpatterns) =20 urlpatterns +=3D [ - url("^login/$", auth_views.login, {"template_name": "login.html"}, nam= e=3D"login"), - url("^logout/$", auth_views.logout, name=3D"logout"), - url("^change-password/$", auth_views.password_change, {"template_name"= : "password-change.html"}, name=3D"password_change"), - url("^change-password/done/$", auth_views.password_change_done, {"temp= late_name": "password-change-done.html"}, name=3D"password_change_done"), + url("^login/$", + auth_views.LoginView.as_view(template_name=3D"login.html"), + name=3D"login"), + url("^logout/$", + auth_views.LogoutView.as_view(), name=3D"logout"), + url("^change-password/$", + auth_views.PasswordChangeView.as_view(template_name=3D"password-ch= ange.html"), + name=3D"password_change"), + url("^change-password/done/$", + auth_views.PasswordChangeDoneView.as_view(template_name=3D"passwor= d-change-done.html"), + name=3D"password_change_done"), url(r"^search$", views.view_search, name=3D"search"), url(r"^search-help$", views.view_search_help, name=3D"search_help"), url(r"^(?P[^/]*)/$", views.view_series_list, name=3D"series_l= ist"), --=20 2.25.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel