From: Magnus Hagander Date: Tue, 9 Apr 2024 11:15:29 +0000 (+0200) Subject: Update for django 4.2 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=HEAD;p=pgmailmgr.git Update for django 4.2 --- diff --git a/pgmailmgr/auth.py b/pgmailmgr/auth.py index 0a07571..9343fc0 100644 --- a/pgmailmgr/auth.py +++ b/pgmailmgr/auth.py @@ -47,12 +47,12 @@ import time # This signal fires when a user is created based on data from upstream. -auth_user_created_from_upstream = Signal(providing_args=['user', ]) +auth_user_created_from_upstream = Signal() # This signal fires whenever new user data has been received. Note that this # happens *after* first_name, last_name and email has been updated on the user # record, so those are not included in the userdata struct. -auth_user_data_received = Signal(providing_args=['user', 'userdata']) +auth_user_data_received = Signal() class AuthBackend(ModelBackend): diff --git a/pgmailmgr/urls.py b/pgmailmgr/urls.py index e1a358c..6831c65 100644 --- a/pgmailmgr/urls.py +++ b/pgmailmgr/urls.py @@ -1,4 +1,4 @@ -from django.conf.urls import include, url +from django.urls import re_path import pgmailmgr.mailmgr.views as views import pgmailmgr.auth @@ -8,16 +8,16 @@ from django.contrib import admin admin.autodiscover() urlpatterns = [ - url(r'^$', views.home), - url(r'^user/(\d+|add)/$', views.userform), - url(r'^forwarder/(\d+|add)/$', views.forwarderform), + re_path(r'^$', views.home), + re_path(r'^user/(\d+|add)/$', views.userform), + re_path(r'^forwarder/(\d+|add)/$', views.forwarderform), # Auth - url('^auth_receive/$', pgmailmgr.auth.auth_receive), - url('^auth_api/$', pgmailmgr.auth.auth_api), - url('^accounts/logout/$', pgmailmgr.auth.logout), - url('^accounts/login/$', pgmailmgr.auth.login), + re_path('^auth_receive/$', pgmailmgr.auth.auth_receive), + re_path('^auth_api/$', pgmailmgr.auth.auth_api), + re_path('^accounts/logout/$', pgmailmgr.auth.logout), + re_path('^accounts/login/$', pgmailmgr.auth.login), # Uncomment the next line to enable the admin: - url(r'^admin/', admin.site.urls), + re_path(r'^admin/', admin.site.urls), ]