Skip to content

Updated django, third party version. #549

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cab/__init__.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion cab/tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ def test_snippet_add(self):
self.assertEqual(new_snippet.title, "Hi")
self.assertEqual(new_snippet.description_html, "<h1>wazzah</h1>")
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)


Expand Down
2 changes: 1 addition & 1 deletion comments_spamfighter/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion comments_spamfighter/models.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
5 changes: 3 additions & 2 deletions djangosnippets/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ 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",
"cab",
"comments_spamfighter",
"ratings",
"taggit",
"captcha",
"django_recaptcha",
"django_extensions",
"rest_framework",
"django_htmx",
Expand All @@ -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 = [
Expand Down
3 changes: 2 additions & 1 deletion djangosnippets/settings/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django_htmx.middleware.HtmxMiddleware",
"allauth.account.middleware.AccountMiddleware",
)


Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{% load socialaccount %}

{% get_providers as socialaccount_providers %}

{% for provider in socialaccount_providers %}
<li>
<a title="{{ provider.name }}" class="button small" href="{% provider_login_url provider.id process=process %}"><i class="fa fa-{{ provider.id }}"></i> {{ provider.name }}</a>
Expand Down
4 changes: 2 additions & 2 deletions ratings/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <form> elements or
Expand All @@ -17,7 +17,7 @@ def rate_object(request, ct, pk, score=1, add=True):
return HttpResponseNotAllowed('Invalid request method: "%s". ' "Must be POST." % request.method)

redirect_url = request.POST.get("next") or request.GET.get("next") or request.META.get("HTTP_REFERER")
if redirect_url and not is_safe_url(redirect_url, settings.ALLOWED_HOSTS):
if redirect_url and not url_has_allowed_host_and_scheme(redirect_url, settings.ALLOWED_HOSTS):
return HttpResponseBadRequest("Invalid next URL.")
if not redirect_url:
redirect_url = "/"
Expand Down
19 changes: 10 additions & 9 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
bleach==6.2.0
Django==3.2.15
Django==5.2.3
dj-database-url==0.5.0
django-allauth==0.50.0
django-contrib-comments==2.1.0
django-extensions==3.1.5
django-allauth==65.9.0
django-contrib-comments==2.2.0
django-extensions==4.1
django-generic-aggregation==0.4.0
django-ratelimit-backend==2.0
django-recaptcha==2.0.6
django-taggit==3.0.0
django-recaptcha==4.1.0
django-taggit==6.1.0
ipython==7.33.0
Markdown==3.4.4
Pillow==9.1.0
Pillow==11.2.1
Pygments==2.12.0
python-akismet==0.4.2
requests==2.26.0
six==1.15.0
urllib3==1.26.6
whitenoise==6.1.0
psycopg2-binary==2.9.3
djangorestframework==3.12.4
psycopg2-binary==2.9.10
djangorestframework==3.16.0
requests-oauthlib==1.4.1
django-htmx==1.15.0
gevent==22.10.2 # Updated version of gevent
greenlet==3.0.3 # Updated version of greenlet
Expand Down
Loading