diff --git a/cab/__init__.py b/cab/__init__.py
index e35668e7..39ba19df 100644
--- a/cab/__init__.py
+++ b/cab/__init__.py
@@ -1,5 +1,5 @@
def get_form():
- from captcha.fields import ReCaptchaField
+ from django_recaptcha.fields import ReCaptchaField
from django import forms
from django_comments.forms import CommentForm
diff --git a/cab/tests/tests.py b/cab/tests/tests.py
index 7800b28d..2d21c6f3 100644
--- a/cab/tests/tests.py
+++ b/cab/tests/tests.py
@@ -516,7 +516,7 @@ def test_snippet_add(self):
self.assertEqual(new_snippet.title, "Hi")
self.assertEqual(new_snippet.description_html, "
wazzah
")
self.assertEqual(new_snippet.code, 'print "Hi"')
- self.assertEqual([t.name for t in new_snippet.tags.all()], ["world", "hi"])
+ self.assertEqual([t.name for t in new_snippet.tags.all()], ["hi", "world"])
self.assertRedirects(resp, "/snippets/%d/" % new_snippet.pk)
diff --git a/comments_spamfighter/admin.py b/comments_spamfighter/admin.py
index 1fc8bccb..cd7ef210 100644
--- a/comments_spamfighter/admin.py
+++ b/comments_spamfighter/admin.py
@@ -2,7 +2,7 @@
from django import forms
from django.contrib import admin
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
from .models import Keyword
diff --git a/comments_spamfighter/models.py b/comments_spamfighter/models.py
index 9741b711..3fe937db 100644
--- a/comments_spamfighter/models.py
+++ b/comments_spamfighter/models.py
@@ -1,6 +1,6 @@
from django.conf import settings
from django.db import models
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
class Keyword(models.Model):
diff --git a/djangosnippets/settings/base.py b/djangosnippets/settings/base.py
index 5ba0bb9f..8b51749b 100644
--- a/djangosnippets/settings/base.py
+++ b/djangosnippets/settings/base.py
@@ -53,7 +53,7 @@ def user_url(user):
"allauth",
"allauth.account",
"allauth.socialaccount",
- "allauth.socialaccount.providers.bitbucket",
+ "allauth.socialaccount.providers.bitbucket_oauth2",
"allauth.socialaccount.providers.github",
"allauth.socialaccount.providers.twitter",
"base",
@@ -61,7 +61,7 @@ def user_url(user):
"comments_spamfighter",
"ratings",
"taggit",
- "captcha",
+ "django_recaptcha",
"django_extensions",
"rest_framework",
"django_htmx",
@@ -80,6 +80,7 @@ def user_url(user):
"django.contrib.flatpages.middleware.FlatpageFallbackMiddleware",
"ratelimitbackend.middleware.RateLimitMiddleware",
"django_htmx.middleware.HtmxMiddleware",
+ "allauth.account.middleware.AccountMiddleware",
)
TEMPLATES = [
diff --git a/djangosnippets/settings/testing.py b/djangosnippets/settings/testing.py
index 7c827369..9d591949 100644
--- a/djangosnippets/settings/testing.py
+++ b/djangosnippets/settings/testing.py
@@ -9,6 +9,7 @@
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django_htmx.middleware.HtmxMiddleware",
+ "allauth.account.middleware.AccountMiddleware",
)
@@ -24,7 +25,7 @@
"allauth",
"allauth.account",
"allauth.socialaccount",
- "allauth.socialaccount.providers.bitbucket",
+ "allauth.socialaccount.providers.bitbucket_oauth2",
"allauth.socialaccount.providers.github",
"allauth.socialaccount.providers.twitter",
"base",
diff --git a/djangosnippets/templates/socialaccount/snippets/provider_list.html b/djangosnippets/templates/socialaccount/snippets/provider_list.html
index e058913e..4b01829c 100644
--- a/djangosnippets/templates/socialaccount/snippets/provider_list.html
+++ b/djangosnippets/templates/socialaccount/snippets/provider_list.html
@@ -1,7 +1,6 @@
{% load socialaccount %}
{% get_providers as socialaccount_providers %}
-
{% for provider in socialaccount_providers %}
{{ provider.name }}
diff --git a/ratings/views.py b/ratings/views.py
index 20f52801..a5692551 100644
--- a/ratings/views.py
+++ b/ratings/views.py
@@ -3,7 +3,7 @@
from django.contrib.contenttypes.models import ContentType
from django.http import Http404, HttpResponse, HttpResponseBadRequest, HttpResponseNotAllowed, HttpResponseRedirect
from django.shortcuts import get_object_or_404
-from django.utils.http import is_safe_url
+from django.utils.http import url_has_allowed_host_and_scheme
# allow GET requests to create ratings -- this goes against the "GET" requests
# should be idempotent but avoids the necessity of using