From e5682c25732bef6f0c6e3e2823fcf19eefa1f503 Mon Sep 17 00:00:00 2001 From: Robert Helewka Date: Wed, 13 May 2026 06:26:12 -0400 Subject: [PATCH] fix: update ImmediateHttpResponse import path for allauth --- .../templates/socialaccount/signup.html | 51 +++++++++++++++++++ mnemosyne/themis/adapters.py | 2 +- mnemosyne/themis/tests/test_adapters.py | 2 +- 3 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 mnemosyne/mnemosyne/templates/socialaccount/signup.html diff --git a/mnemosyne/mnemosyne/templates/socialaccount/signup.html b/mnemosyne/mnemosyne/templates/socialaccount/signup.html new file mode 100644 index 0000000..09bcadb --- /dev/null +++ b/mnemosyne/mnemosyne/templates/socialaccount/signup.html @@ -0,0 +1,51 @@ +{% extends "themis/base.html" %} + +{% block title %}Complete Sign Up — {{ themis_app_name }}{% endblock %} + +{% block content %} +
+
+
+

Complete Sign Up

+

+ Confirm your email address to finish signing in with SSO. +

+ + {% if form.errors %} +
+ + + + Please correct the errors below. +
+ {% endif %} + +
+ {% csrf_token %} + +
+ + + {% if form.email.errors %} + + {% endif %} +
+ +
+ +
+
+ +
+
+
+{% endblock %} diff --git a/mnemosyne/themis/adapters.py b/mnemosyne/themis/adapters.py index b647dde..3ce6fbf 100644 --- a/mnemosyne/themis/adapters.py +++ b/mnemosyne/themis/adapters.py @@ -1,7 +1,7 @@ import logging from allauth.account.adapter import DefaultAccountAdapter -from allauth.exceptions import ImmediateHttpResponse +from allauth.core.exceptions import ImmediateHttpResponse from allauth.socialaccount.adapter import DefaultSocialAccountAdapter from django.contrib import messages from django.contrib.auth.models import Group diff --git a/mnemosyne/themis/tests/test_adapters.py b/mnemosyne/themis/tests/test_adapters.py index d514a8f..3df09ad 100644 --- a/mnemosyne/themis/tests/test_adapters.py +++ b/mnemosyne/themis/tests/test_adapters.py @@ -88,7 +88,7 @@ class CasdoorAdapterTest(TestCase): self.assertEqual(user.groups.count(), 0) def test_superuser_sso_login_blocked(self): - from allauth.exceptions import ImmediateHttpResponse + from allauth.core.exceptions import ImmediateHttpResponse user = User.objects.create_superuser( "admin@example.com", "admin@example.com", "pass"