From ccad6baa82850fe3c7e41cdc20a06dca4942e628 Mon Sep 17 00:00:00 2001 From: Katherine Domingo Date: Wed, 4 Mar 2026 14:48:04 +0800 Subject: [PATCH 01/16] Set package requirement versions the same as setup.py --- sandbox/requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sandbox/requirements.txt b/sandbox/requirements.txt index aebb00e..010059c 100644 --- a/sandbox/requirements.txt +++ b/sandbox/requirements.txt @@ -1,4 +1,4 @@ -Django>=3.2 -wagtail>=4.1 -django-debug-toolbar==3.2.2 +Django>=5.2 +Wagtail>=7.0 +django-debug-toolbar==6.2.0 -e .[docs,test] From 6eca8707a4714301d7c8e6ba2dca9a7060843135 Mon Sep 17 00:00:00 2001 From: Katherine Domingo Date: Wed, 4 Mar 2026 14:48:32 +0800 Subject: [PATCH 02/16] Run django-upgrade (target version 5.2) --- sandbox/sandbox/settings.py | 1 - sandbox/sandbox/urls.py | 9 +++++---- src/wagtail_2fa/wagtail_hooks.py | 18 +++++++++--------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/sandbox/sandbox/settings.py b/sandbox/sandbox/settings.py index 5ce9f87..8289b02 100644 --- a/sandbox/sandbox/settings.py +++ b/sandbox/sandbox/settings.py @@ -119,7 +119,6 @@ USE_I18N = True -USE_L10N = True USE_TZ = True diff --git a/sandbox/sandbox/urls.py b/sandbox/sandbox/urls.py index 7439f5a..8553305 100644 --- a/sandbox/sandbox/urls.py +++ b/sandbox/sandbox/urls.py @@ -1,6 +1,7 @@ import debug_toolbar from django.conf import settings from django.contrib import admin +from django.urls import path from django.urls import include, re_path from wagtail import urls as wagtail_urls @@ -9,9 +10,9 @@ urlpatterns = [ re_path(r'^admin/', admin.site.urls), - re_path(r'^cms/', include(wagtailadmin_urls)), - re_path(r'^documents/', include(wagtaildocs_urls)), - re_path(r'', include(wagtail_urls)), + path('cms/', include(wagtailadmin_urls)), + path('documents/', include(wagtaildocs_urls)), + path('', include(wagtail_urls)), ] @@ -24,5 +25,5 @@ urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) urlpatterns = [ - re_path(r'^__debug__/', include(debug_toolbar.urls)), + path('__debug__/', include(debug_toolbar.urls)), ] + urlpatterns diff --git a/src/wagtail_2fa/wagtail_hooks.py b/src/wagtail_2fa/wagtail_hooks.py index 17284cf..680eabc 100644 --- a/src/wagtail_2fa/wagtail_hooks.py +++ b/src/wagtail_2fa/wagtail_hooks.py @@ -1,6 +1,6 @@ from django.conf import settings from django.contrib.auth.models import Permission -from django.urls import path, re_path, reverse +from django.urls import path, reverse from django.utils.translation import gettext_lazy as _ from wagtail import hooks @@ -16,8 +16,8 @@ def urlpatterns(): return [ path("2fa/auth", views.LoginView.as_view(), name="wagtail_2fa_auth"), - re_path( - r"^2fa/devices/(?P\d+)$", + path( + "2fa/devices/", views.DeviceListView.as_view(), name="wagtail_2fa_device_list", ), @@ -26,18 +26,18 @@ def urlpatterns(): views.DeviceCreateView.as_view(), name="wagtail_2fa_device_new", ), - re_path( - r"^2fa/devices/(?P\d+)/update$", + path( + "2fa/devices//update", views.DeviceUpdateView.as_view(), name="wagtail_2fa_device_update", ), - re_path( - r"^2fa/devices/(?P\d+)/remove$", + path( + "2fa/devices//remove", views.DeviceDeleteView.as_view(), name="wagtail_2fa_device_remove", ), - re_path( - r"^2fa/devices/qr-code$", + path( + "2fa/devices/qr-code", views.DeviceQRCodeView.as_view(), name="wagtail_2fa_device_qrcode", ), From c1d69591c60f75281687f49f9e423e421044a1b1 Mon Sep 17 00:00:00 2001 From: Katherine Domingo Date: Wed, 4 Mar 2026 14:52:30 +0800 Subject: [PATCH 03/16] Update classifiers to be compatible with the requirement versions --- setup.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 37b8836..aec8f68 100644 --- a/setup.py +++ b/setup.py @@ -57,19 +57,18 @@ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", - "Framework :: Django :: 3.2", - "Framework :: Django :: 4.1", - "Framework :: Django :: 4.2", + "Framework :: Django :: 5.2", "Framework :: Wagtail", - "Framework :: Wagtail :: 2", - "Framework :: Wagtail :: 3", - "Framework :: Wagtail :: 4", + "Framework :: Wagtail :: 7", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", ], zip_safe=False, ) From afdb012bc0541b4fa3be6de878aa1b32ec192c98 Mon Sep 17 00:00:00 2001 From: Katherine Domingo Date: Wed, 4 Mar 2026 14:56:09 +0800 Subject: [PATCH 04/16] Update test matrix on tox.ini --- tox.ini | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 53f6768..94ae607 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,7 @@ [tox] envlist = - python{3.13,3.14}-django{5.2}-wagtail{7.0} + python{3.13}-django{5.2}-wagtail{7.0,7.1,7.2,7.3}, + python{3.14}-django{5.2}-wagtail{7.2,7.3}, [gh-actions] python = @@ -17,6 +18,9 @@ basepython = deps = django5.2: Django>=5.2,<6.0 wagtail7.0: wagtail>=7.0,<7.1 + wagtail7.1: wagtail>=7.1,<7.2 + wagtail7.2: wagtail>=7.2,<7.3 + wagtail7.3: wagtail>=7.3,<7.4 extras = test From baf579efd6be04272cb51edff9b61cb3908f4656 Mon Sep 17 00:00:00 2001 From: Katherine Domingo Date: Wed, 4 Mar 2026 15:00:53 +0800 Subject: [PATCH 05/16] Wagtail 5.0: Progress button-longrunning now relies on data attributes - The `button-longrunning` class usage has been updated to use the newly adopted Stimulus approach --- src/wagtail_2fa/templates/wagtail_2fa/legacy/otp_form.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wagtail_2fa/templates/wagtail_2fa/legacy/otp_form.html b/src/wagtail_2fa/templates/wagtail_2fa/legacy/otp_form.html index 05b3dd1..1241add 100644 --- a/src/wagtail_2fa/templates/wagtail_2fa/legacy/otp_form.html +++ b/src/wagtail_2fa/templates/wagtail_2fa/legacy/otp_form.html @@ -43,7 +43,7 @@

{% block branding_login %}{% trans "Enter your two-factor authentication cod {% endblock %}
{% block submit_buttons %} - + {% trans 'Sign out' %} From 54a849f31760f44463c1827c979654882f6bf677 Mon Sep 17 00:00:00 2001 From: Katherine Domingo Date: Wed, 4 Mar 2026 15:08:05 +0800 Subject: [PATCH 06/16] Update logo to the latest version --- src/wagtail_2fa/templates/wagtail_2fa/legacy/otp_form.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wagtail_2fa/templates/wagtail_2fa/legacy/otp_form.html b/src/wagtail_2fa/templates/wagtail_2fa/legacy/otp_form.html index 1241add..4699b9c 100644 --- a/src/wagtail_2fa/templates/wagtail_2fa/legacy/otp_form.html +++ b/src/wagtail_2fa/templates/wagtail_2fa/legacy/otp_form.html @@ -55,7 +55,7 @@

{% block branding_login %}{% trans "Enter your two-factor authentication cod {% block branding_logo %} {% endblock %} From 3ed7bf055945b8b8550f5b49eb9d5c8f37ebbb0c Mon Sep 17 00:00:00 2001 From: Katherine Domingo Date: Wed, 4 Mar 2026 15:17:23 +0800 Subject: [PATCH 07/16] Wagtail 6.0: Introduce an internal {% formattedfield %} tag to replace direct use of wagtailadmin/shared/field.html --- src/wagtail_2fa/templates/wagtail_2fa/legacy/otp_form.html | 4 ++-- src/wagtail_2fa/templates/wagtail_2fa/otp_form.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wagtail_2fa/templates/wagtail_2fa/legacy/otp_form.html b/src/wagtail_2fa/templates/wagtail_2fa/legacy/otp_form.html index 4699b9c..4473e46 100644 --- a/src/wagtail_2fa/templates/wagtail_2fa/legacy/otp_form.html +++ b/src/wagtail_2fa/templates/wagtail_2fa/legacy/otp_form.html @@ -31,11 +31,11 @@

{% block branding_login %}{% trans "Enter your two-factor authentication cod {% block fields %} - {% field field=form.otp_token %}{% endfield %} + {% formattedfield form.otp_token %} {% block extra_fields %} {% for field_name, field in form.extra_fields %} - {% field field=field %}{% endfield %} + {% formattedfield field %} {% endfor %} {% endblock extra_fields %} diff --git a/src/wagtail_2fa/templates/wagtail_2fa/otp_form.html b/src/wagtail_2fa/templates/wagtail_2fa/otp_form.html index 4186232..03a5da1 100644 --- a/src/wagtail_2fa/templates/wagtail_2fa/otp_form.html +++ b/src/wagtail_2fa/templates/wagtail_2fa/otp_form.html @@ -31,11 +31,11 @@

{% block branding_login %}{% trans "Enter your two-factor authentication cod {% block fields %} - {% field field=form.otp_token %}{% endfield %} + {% formattedfield form.otp_token %} {% block extra_fields %} {% for field_name, field in form.extra_fields %} - {% field field=field %}{% endfield %} + {% formattedfield field %} {% endfor %} {% endblock extra_fields %} From 0fbf61d6d9130f9dd18eed13d7ac47b35bf660eb Mon Sep 17 00:00:00 2001 From: Katherine Domingo Date: Wed, 4 Mar 2026 15:23:00 +0800 Subject: [PATCH 08/16] Fix missing icon --- src/wagtail_2fa/templates/wagtail_2fa/device_list.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/wagtail_2fa/templates/wagtail_2fa/device_list.html b/src/wagtail_2fa/templates/wagtail_2fa/device_list.html index 918812e..ada83a0 100644 --- a/src/wagtail_2fa/templates/wagtail_2fa/device_list.html +++ b/src/wagtail_2fa/templates/wagtail_2fa/device_list.html @@ -46,7 +46,10 @@

{# Users can only add devices to their own account #} {% if user_id == request.user.id %} - {% trans 'New device' %} + + + {% trans 'New device' %} + {% endif %} {% endblock %} From 58f38aa2f1a2e6d2bab95a8f7de5ca2a57e46a42 Mon Sep 17 00:00:00 2001 From: Katherine Domingo Date: Wed, 4 Mar 2026 15:53:53 +0800 Subject: [PATCH 09/16] Update otp_form.html, Django 5.0: Support for logging out via GET requests in the django.contrib.auth.views.LogoutView and django.contrib.auth.views.logout_then_login() is removed --- src/wagtail_2fa/templates/wagtail_2fa/otp_form.html | 6 ++++-- src/wagtail_2fa/views.py | 9 +-------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/wagtail_2fa/templates/wagtail_2fa/otp_form.html b/src/wagtail_2fa/templates/wagtail_2fa/otp_form.html index 03a5da1..1cd69da 100644 --- a/src/wagtail_2fa/templates/wagtail_2fa/otp_form.html +++ b/src/wagtail_2fa/templates/wagtail_2fa/otp_form.html @@ -1,4 +1,4 @@ -{% extends "wagtailadmin/admin_base.html" %} +{% extends "wagtailadmin/base.html" %} {% load i18n wagtailadmin_tags %} {% block titletag %}{% trans "Sign in" %}{% endblock %} {% block bodyclass %}login{% endblock %} @@ -45,7 +45,9 @@

{% block branding_login %}{% trans "Enter your two-factor authentication cod {% block submit_buttons %} - {% trans 'Sign out' %} + {% endblock %}

diff --git a/src/wagtail_2fa/views.py b/src/wagtail_2fa/views.py index ef0b348..e59db1b 100644 --- a/src/wagtail_2fa/views.py +++ b/src/wagtail_2fa/views.py @@ -30,14 +30,7 @@ class LoginView(RedirectURLMixin, FormView): - - if WAGTAIL_VERSION >= (6, 0): - template_name = "wagtail_2fa/otp_form_v6.html" - elif WAGTAIL_VERSION < (6, 0) and WAGTAIL_VERSION >= (5, 0): - template_name = "wagtail_2fa/otp_form.html" - else: - template_name = "wagtail_2fa/legacy/otp_form.html" - + template_name = "wagtail_2fa/otp_form.html" form_class = forms.TokenForm redirect_field_name = REDIRECT_FIELD_NAME From a87ba0712f8dcb0b4ea3927572a096609d5a5831 Mon Sep 17 00:00:00 2001 From: Katherine Domingo Date: Wed, 4 Mar 2026 16:00:36 +0800 Subject: [PATCH 10/16] Wagtail 7.1: Deprecation of UserListingButton --- src/wagtail_2fa/wagtail_hooks.py | 38 +++++++++++++------------------- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/src/wagtail_2fa/wagtail_hooks.py b/src/wagtail_2fa/wagtail_hooks.py index 680eabc..d475bb4 100644 --- a/src/wagtail_2fa/wagtail_hooks.py +++ b/src/wagtail_2fa/wagtail_hooks.py @@ -3,13 +3,16 @@ from django.urls import path, reverse from django.utils.translation import gettext_lazy as _ -from wagtail import hooks +from wagtail import hooks, VERSION as WAGTAIL_VERSION from wagtail.admin.menu import MenuItem -from wagtail.users.widgets import UserListingButton -from wagtail_2fa import views +if WAGTAIL_VERSION >= (7, 1): + from wagtail.admin.widgets import ListingButton +else: + from wagtail.users.widgets import UserListingButton as ListingButton -from wagtail import VERSION as WAGTAIL_VERSION + +from wagtail_2fa import views @hooks.register("register_admin_urls") @@ -70,25 +73,14 @@ def register(request): } -if WAGTAIL_VERSION >= (6, 0): - @hooks.register("register_user_listing_buttons") - def register_user_listing_buttons(user, request_user): - yield UserListingButton( - _("Manage 2FA"), - reverse("wagtail_2fa_device_list", kwargs={"user_id": user.id}), - attrs={"title": _("Edit this user")}, - priority=100, - ) -else: - @hooks.register("register_user_listing_buttons") - def register_user_listing_buttons(context, user): - yield UserListingButton( - _("Manage 2FA"), - reverse("wagtail_2fa_device_list", kwargs={"user_id": user.id}), - attrs={"title": _("Edit this user")}, - priority=100, - ) - +@hooks.register("register_user_listing_buttons") +def register_user_listing_buttons(user, request_user): + yield ListingButton( + _("Manage 2FA"), + reverse("wagtail_2fa_device_list", kwargs={"user_id": user.id}), + attrs={"title": _("Edit this user")}, + priority=100, + ) @hooks.register("register_permissions") From 4a39fbac2e084d64102af2efa8541ef23d5cbc0a Mon Sep 17 00:00:00 2001 From: Katherine Domingo Date: Wed, 4 Mar 2026 16:03:07 +0800 Subject: [PATCH 11/16] Remove legacy and unused otp form templates --- .../wagtail_2fa/legacy/otp_form.html | 62 ----------------- .../templates/wagtail_2fa/otp_form_v6.html | 66 ------------------- 2 files changed, 128 deletions(-) delete mode 100644 src/wagtail_2fa/templates/wagtail_2fa/legacy/otp_form.html delete mode 100644 src/wagtail_2fa/templates/wagtail_2fa/otp_form_v6.html diff --git a/src/wagtail_2fa/templates/wagtail_2fa/legacy/otp_form.html b/src/wagtail_2fa/templates/wagtail_2fa/legacy/otp_form.html deleted file mode 100644 index 4473e46..0000000 --- a/src/wagtail_2fa/templates/wagtail_2fa/legacy/otp_form.html +++ /dev/null @@ -1,62 +0,0 @@ -{% extends "wagtailadmin/admin_base.html" %} -{% load i18n wagtailadmin_tags %} -{% block titletag %}{% trans "Sign in" %}{% endblock %} -{% block bodyclass %}login{% endblock %} - -{% block furniture %} -
-

{% block branding_login %}{% trans "Enter your two-factor authentication code" %}{% endblock %}

- -
- {# Always show messages div so it can be appended to by JS #} - {% if messages or form.errors %} -
    - {% if form.errors %} -
  • {% blocktrans %}Invalid code{% endblocktrans %}
  • - {% endif %} - {% for message in messages %} -
  • {{ message }}
  • - {% endfor %} -
- {% endif %} -
- - {% block above_login %}{% endblock %} - -
- {% block login_form %} - {% csrf_token %} - - {% url 'wagtailadmin_home' as home_url %} - - - {% block fields %} - {% formattedfield form.otp_token %} - - {% block extra_fields %} - {% for field_name, field in form.extra_fields %} - {% formattedfield field %} - {% endfor %} - {% endblock extra_fields %} - - {% endblock %} - {% endblock %} -
- {% block submit_buttons %} - - - {% trans 'Sign out' %} - - {% endblock %} -
-
- - {% block below_login %}{% endblock %} - - {% block branding_logo %} - - {% endblock %} -
-{% endblock %} diff --git a/src/wagtail_2fa/templates/wagtail_2fa/otp_form_v6.html b/src/wagtail_2fa/templates/wagtail_2fa/otp_form_v6.html deleted file mode 100644 index d114d95..0000000 --- a/src/wagtail_2fa/templates/wagtail_2fa/otp_form_v6.html +++ /dev/null @@ -1,66 +0,0 @@ -{% extends "wagtailadmin/base.html" %} -{% load i18n wagtailadmin_tags %} -{% block titletag %}{% trans "Sign in" %}{% endblock %} -{% block bodyclass %}login{% endblock %} - -{% block furniture %} -
-

{% block branding_login %}{% trans "Enter your two-factor authentication code" %}{% endblock %}

- -
- {# Always show messages div so it can be appended to by JS #} - {% if messages or form.errors %} -
    - {% if form.errors %} -
  • {% blocktrans %}Invalid code{% endblocktrans %}
  • - {% endif %} - {% for message in messages %} -
  • {{ message }}
  • - {% endfor %} -
- {% endif %} -
- - {% block above_login %}{% endblock %} - -
- {% block login_form %} - {% csrf_token %} - - {% url 'wagtailadmin_home' as home_url %} - - - {% block fields %} - {% formattedfield field=form.otp_token %} - {% block extra_fields %} - {% for field_name, field in form.extra_fields %} - {% formattedfield field=field %} - {% endfor %} - {% endblock extra_fields %} - {% endblock %} - {% endblock %} -
- {% block submit_buttons %} - - - - - - {% endblock %} -
-
- - {% block below_login %}{% endblock %} - - {% block branding_logo %} - - {% endblock %} - - -
-{% endblock %} \ No newline at end of file From 9b43984284d8be700ee1a4d8fffc318917b7d9b0 Mon Sep 17 00:00:00 2001 From: Katherine Domingo Date: Wed, 4 Mar 2026 16:16:38 +0800 Subject: [PATCH 12/16] Switch button type to make it appear under the more menu --- src/wagtail_2fa/wagtail_hooks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wagtail_2fa/wagtail_hooks.py b/src/wagtail_2fa/wagtail_hooks.py index d475bb4..9401ccc 100644 --- a/src/wagtail_2fa/wagtail_hooks.py +++ b/src/wagtail_2fa/wagtail_hooks.py @@ -7,9 +7,9 @@ from wagtail.admin.menu import MenuItem if WAGTAIL_VERSION >= (7, 1): - from wagtail.admin.widgets import ListingButton + from wagtail.admin.widgets import Button else: - from wagtail.users.widgets import UserListingButton as ListingButton + from wagtail.users.widgets import UserListingButton as Button from wagtail_2fa import views @@ -75,7 +75,7 @@ def register(request): @hooks.register("register_user_listing_buttons") def register_user_listing_buttons(user, request_user): - yield ListingButton( + yield Button( _("Manage 2FA"), reverse("wagtail_2fa_device_list", kwargs={"user_id": user.id}), attrs={"title": _("Edit this user")}, From 57e8d2403370d87bd492156f317f111e7b872525 Mon Sep 17 00:00:00 2001 From: Katherine Domingo Date: Wed, 4 Mar 2026 16:25:22 +0800 Subject: [PATCH 13/16] Update CHANGES --- CHANGES | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES b/CHANGES index 7dc216c..fe48d46 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +Unreleased +================== + - Add testing for Python 3.14, Wagtail 7.2, and Wagtail 7.3 + - Update dependencies to latest versions + + 1.8.0 (2026-02-05) ================== - bump required version of django-otp and update middleware From fb4bf1c8bec3fc5382d9cad059601452df2efb6a Mon Sep 17 00:00:00 2001 From: Katherine Domingo Date: Wed, 4 Mar 2026 16:29:45 +0800 Subject: [PATCH 14/16] Update package versions on dependabot.yml --- .github/dependabot.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 5f4d7c7..f8433e0 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,20 +9,19 @@ updates: ignore: - dependency-name: flake8 versions: - - 3.8.4 - - 3.9.0 + - 7.3.0 - dependency-name: coverage versions: - - "5.4" + - "7.13.4" - dependency-name: pytest versions: - - 6.2.2 + - 9.0.2 - dependency-name: isort versions: - - 5.7.0 + - 8.0.1 - dependency-name: django-debug-toolbar versions: - - "3.2" + - "6.2.0" - dependency-name: pytest-django versions: - - 4.1.0 + - 4.12.0 From c4dd012dfd9a506fa91c8411517e83595cbc33ba Mon Sep 17 00:00:00 2001 From: Katherine Domingo Date: Wed, 4 Mar 2026 19:37:13 +0800 Subject: [PATCH 15/16] Make allowed URL names configurable through WAGTAIL_2FA_ALLOWED_URL_NAMES --- src/wagtail_2fa/middleware.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/wagtail_2fa/middleware.py b/src/wagtail_2fa/middleware.py index 9773a78..f506190 100644 --- a/src/wagtail_2fa/middleware.py +++ b/src/wagtail_2fa/middleware.py @@ -17,6 +17,10 @@ class VerifyUserMiddleware(_OTPMiddleware): "wagtailadmin_sprite", ] + def get_allowed_url_names(self): + extra = getattr(settings, "WAGTAIL_2FA_ALLOWED_URL_NAMES", []) + return self._allowed_url_names + list(extra) + # These URLs do not require verification if the user has no devices _allowed_url_names_no_device = [ "wagtail_2fa_device_list", @@ -75,7 +79,7 @@ def _require_verified_user(self, request): # Don't require verification for specified URL names request_url_name = resolve(request.path_info).url_name - if request_url_name in self._allowed_url_names: + if request_url_name in self.get_allowed_url_names(): return False # If the user does not have a device, don't require verification From 385b1d39322dfb4ec51562bb11ef3db9dc73ecad Mon Sep 17 00:00:00 2001 From: nickmoreton Date: Thu, 16 Apr 2026 15:06:03 +0100 Subject: [PATCH 16/16] Remove Python 3.8 and 3.9 from classifiers --- setup.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/setup.py b/setup.py index aec8f68..292bb94 100644 --- a/setup.py +++ b/setup.py @@ -62,8 +62,6 @@ "Framework :: Wagtail :: 7", "License :: OSI Approved :: MIT License", "Programming Language :: Python", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12",