Skip to content

Commit f60b2ca

Browse files
committed
Updated django, third party version.
1 parent 2375bec commit f60b2ca

File tree

7 files changed

+20
-17
lines changed

7 files changed

+20
-17
lines changed

cab/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
def get_form():
2-
from captcha.fields import ReCaptchaField
2+
from django_recaptcha.fields import ReCaptchaField
33
from django import forms
44
from django_comments.forms import CommentForm
55

comments_spamfighter/admin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from django import forms
44
from django.contrib import admin
5-
from django.utils.translation import ugettext_lazy as _
5+
from django.utils.translation import gettext_lazy as _
66

77
from .models import Keyword
88

comments_spamfighter/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from django.conf import settings
22
from django.db import models
3-
from django.utils.translation import ugettext_lazy as _
3+
from django.utils.translation import gettext_lazy as _
44

55

66
class Keyword(models.Model):

djangosnippets/settings/base.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ def user_url(user):
5353
"allauth",
5454
"allauth.account",
5555
"allauth.socialaccount",
56-
"allauth.socialaccount.providers.bitbucket",
56+
"allauth.socialaccount.providers.bitbucket_oauth2",
5757
"allauth.socialaccount.providers.github",
5858
"allauth.socialaccount.providers.twitter",
5959
"base",
6060
"cab",
6161
"comments_spamfighter",
6262
"ratings",
6363
"taggit",
64-
"captcha",
64+
"django_recaptcha",
6565
"django_extensions",
6666
"rest_framework",
6767
"django_htmx",
@@ -80,6 +80,7 @@ def user_url(user):
8080
"django.contrib.flatpages.middleware.FlatpageFallbackMiddleware",
8181
"ratelimitbackend.middleware.RateLimitMiddleware",
8282
"django_htmx.middleware.HtmxMiddleware",
83+
"allauth.account.middleware.AccountMiddleware",
8384
)
8485

8586
TEMPLATES = [

djangosnippets/settings/testing.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"django.contrib.auth.middleware.AuthenticationMiddleware",
1010
"django.contrib.messages.middleware.MessageMiddleware",
1111
"django_htmx.middleware.HtmxMiddleware",
12+
"allauth.account.middleware.AccountMiddleware",
1213
)
1314

1415

@@ -24,7 +25,7 @@
2425
"allauth",
2526
"allauth.account",
2627
"allauth.socialaccount",
27-
"allauth.socialaccount.providers.bitbucket",
28+
"allauth.socialaccount.providers.bitbucket_oauth2",
2829
"allauth.socialaccount.providers.github",
2930
"allauth.socialaccount.providers.twitter",
3031
"base",

ratings/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from django.contrib.contenttypes.models import ContentType
44
from django.http import Http404, HttpResponse, HttpResponseBadRequest, HttpResponseNotAllowed, HttpResponseRedirect
55
from django.shortcuts import get_object_or_404
6-
from django.utils.http import is_safe_url
6+
from django.utils.http import url_has_allowed_host_and_scheme
77

88
# allow GET requests to create ratings -- this goes against the "GET" requests
99
# should be idempotent but avoids the necessity of using <form> elements or
@@ -17,7 +17,7 @@ def rate_object(request, ct, pk, score=1, add=True):
1717
return HttpResponseNotAllowed('Invalid request method: "%s". ' "Must be POST." % request.method)
1818

1919
redirect_url = request.POST.get("next") or request.GET.get("next") or request.META.get("HTTP_REFERER")
20-
if redirect_url and not is_safe_url(redirect_url, settings.ALLOWED_HOSTS):
20+
if redirect_url and not url_has_allowed_host_and_scheme(redirect_url, settings.ALLOWED_HOSTS):
2121
return HttpResponseBadRequest("Invalid next URL.")
2222
if not redirect_url:
2323
redirect_url = "/"

requirements/base.txt

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
bleach==6.2.0
2-
Django==3.2.15
2+
Django==5.2.3
33
dj-database-url==0.5.0
4-
django-allauth==0.50.0
5-
django-contrib-comments==2.1.0
6-
django-extensions==3.1.5
4+
django-allauth==65.9.0
5+
django-contrib-comments==2.2.0
6+
django-extensions==4.1
77
django-generic-aggregation==0.4.0
88
django-ratelimit-backend==2.0
9-
django-recaptcha==2.0.6
10-
django-taggit==3.0.0
9+
django-recaptcha==4.1.0
10+
django-taggit==6.1.0
1111
ipython==7.33.0
1212
Markdown==3.4.4
13-
Pillow==9.1.0
13+
Pillow==11.2.1
1414
Pygments==2.12.0
1515
python-akismet==0.4.2
1616
requests==2.26.0
1717
six==1.15.0
1818
urllib3==1.26.6
1919
whitenoise==6.1.0
20-
psycopg2-binary==2.9.3
21-
djangorestframework==3.12.4
20+
psycopg2-binary==2.9.10
21+
djangorestframework==3.16.0
22+
requests-oauthlib==1.4.1
2223
django-htmx==1.15.0
2324
gevent==22.10.2 # Updated version of gevent
2425
greenlet==3.0.3 # Updated version of greenlet

0 commit comments

Comments
 (0)