summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Hagander2024-04-09 11:15:29 +0000
committerMagnus Hagander2024-04-09 11:15:29 +0000
commit9fd900f39bcda7b31fdb2152b89dc4a14e52757a (patch)
tree2ce54ccd42a476c0232c3bb5764817f5f90c3c8b
parent6695165cb1433aad93d290c76028dbc748fcec19 (diff)
Update for django 4.2
-rw-r--r--pgmailmgr/auth.py4
-rw-r--r--pgmailmgr/urls.py18
2 files changed, 11 insertions, 11 deletions
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),
]