Upgrade for allauth
authorRadek Czajka <radekczajka@wolnelektury.pl>
Mon, 9 Nov 2026 14:21:30 +0000 (15:21 +0100)
committerRadek Czajka <radekczajka@wolnelektury.pl>
Mon, 9 Nov 2026 14:21:30 +0000 (15:21 +0100)
requirements/requirements.txt
src/wolnelektury/settings/auth.py
src/wolnelektury/settings/basic.py
src/wolnelektury/templates/account/base.html [deleted file]
src/wolnelektury/templates/allauth/layouts/base.html [new file with mode: 0644]

index 4e9120b..ae4c248 100644 (file)
@@ -12,7 +12,7 @@ jsmin==3.0.1
 
 fnp-django-pagination==2.2.12
 django-modeltranslation==0.18.12
-django-allauth==0.54
+django-allauth[socialaccount,openid]==0.63.6
 django-extensions==3.2.3
 djangorestframework==3.15.1
 django-filter==23.5
index 89e520f..2fe844c 100644 (file)
@@ -29,24 +29,5 @@ SOCIALACCOUNT_PROVIDERS = {
     'facebook': {
         'METHOD': 'oauth2',
         'SCOPE': ['email', 'public_profile'],
-        # 'AUTH_PARAMS': {'auth_type': 'reauthenticate'},
-        # 'INIT_PARAMS': {'cookie': True},
-        # 'FIELDS': [
-        #     'id',
-        #     'email',
-        #     'name',
-        #     'first_name',
-        #     'last_name',
-        #     'verified',
-        #     'locale',
-        #     'timezone',
-        #     'link',
-        #     'gender',
-        #     'updated_time',
-        # ],
-        # 'EXCHANGE_TOKEN': True,
-        # 'LOCALE_FUNC': 'path.to.callable',
-        # 'VERIFIED_EMAIL': False,
-        'VERSION': 'v2.12',
     },
 }
index fe048e4..1b86642 100644 (file)
@@ -118,6 +118,7 @@ MIDDLEWARE = [
     'fnpdjango.middleware.SetRemoteAddrFromXRealIP',
     'django.middleware.cache.FetchFromCacheMiddleware',
     'experiments.middleware.experiments_middleware',
+    "allauth.account.middleware.AccountMiddleware",
 ]
 
 ROOT_URLCONF = 'wolnelektury.urls'
diff --git a/src/wolnelektury/templates/account/base.html b/src/wolnelektury/templates/account/base.html
deleted file mode 100644 (file)
index 093fcb2..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-{% extends "base_simple.html" %}
-
-{% block body %}
-  <div class="white-box">
-    {% block content %}{% endblock %}
-  </div>
-{% endblock %}
-
-{% block extrabody %}
-  {% block extra_body %}{% endblock %}
-{% endblock %}
diff --git a/src/wolnelektury/templates/allauth/layouts/base.html b/src/wolnelektury/templates/allauth/layouts/base.html
new file mode 100644 (file)
index 0000000..093fcb2
--- /dev/null
@@ -0,0 +1,11 @@
+{% extends "base_simple.html" %}
+
+{% block body %}
+  <div class="white-box">
+    {% block content %}{% endblock %}
+  </div>
+{% endblock %}
+
+{% block extrabody %}
+  {% block extra_body %}{% endblock %}
+{% endblock %}