From 87ebf5e92feb958d9940ca0e19ae54a3b0e4fb78 Mon Sep 17 00:00:00 2001 From: jonholdsworth <82071930+jonholdsworth@users.noreply.github.com> Date: Thu, 13 Jun 2024 16:15:39 +1000 Subject: [PATCH 1/9] Django 3 -> 4 initial commit --- requirements.txt | 28 +++++++++---------- signbank/comments.py | 4 +-- signbank/customregistration/forms.py | 2 +- signbank/customregistration/signals.py | 2 +- signbank/dictionary/admin.py | 2 +- signbank/dictionary/adminviews.py | 2 +- signbank/dictionary/choicelists.py | 2 +- signbank/dictionary/csv_import.py | 2 +- signbank/dictionary/delete.py | 2 +- signbank/dictionary/forms.py | 2 +- signbank/dictionary/models.py | 2 +- signbank/dictionary/publicviews.py | 2 +- .../templates/dictionary/paginate.html | 2 +- signbank/dictionary/tools.py | 2 +- signbank/dictionary/update.py | 2 +- signbank/dictionary/views.py | 2 +- signbank/settings/base.py | 6 +++- signbank/tools.py | 2 +- signbank/video/admin.py | 4 +-- signbank/video/forms.py | 2 +- signbank/video/models.py | 2 +- signbank/video/views.py | 4 +-- 22 files changed, 42 insertions(+), 38 deletions(-) diff --git a/requirements.txt b/requirements.txt index d6dc4977..367e6ece 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,18 +1,18 @@ -django==3.2.25 -django-tagging==0.5.0 -django-reversion==4.0.0 -django-bootstrap3==21.2 -django-summernote==0.8.11.6 -django-modeltranslation==0.18.2 -django-registration==3.1.2 -django-contrib-comments==1.9.2 -django-queryset-csv==1.1.0 -django-debug-toolbar==3.2.2 -django-guardian==2.2.0 -django-notifications-hq==1.6.0 +django==4.0 +django-tagging +django-reversion +django-bootstrap3 +django-summernote +django-modeltranslation +django-registration +django-contrib-comments +django-queryset-csv +django-debug-toolbar +django-guardian +django-notifications-hq dj-database-url==0.5.0 -boto3==1.22.8 -django-storages==1.12.1 +boto3 +django-storages psycopg2==2.8.6 certifi==2023.7.22 urllib3==1.26.18 diff --git a/signbank/comments.py b/signbank/comments.py index e085ae0f..4ef2fc34 100644 --- a/signbank/comments.py +++ b/signbank/comments.py @@ -8,8 +8,8 @@ from django.forms import ModelForm from django.forms.models import model_to_dict from django.http import HttpResponseForbidden -from django.utils.translation import ugettext as _ -from django.utils.translation import ugettext_lazy as _lazy +from django.utils.translation import gettext as _ +from django.utils.translation import gettext_lazy as _lazy from django.contrib.sites.shortcuts import get_current_site from django.dispatch import receiver from django.contrib.contenttypes.models import ContentType diff --git a/signbank/customregistration/forms.py b/signbank/customregistration/forms.py index 33d2ef1f..14568aed 100644 --- a/signbank/customregistration/forms.py +++ b/signbank/customregistration/forms.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django_registration.forms import RegistrationFormTermsOfService diff --git a/signbank/customregistration/signals.py b/signbank/customregistration/signals.py index 3985e85c..a1366ff1 100644 --- a/signbank/customregistration/signals.py +++ b/signbank/customregistration/signals.py @@ -1,6 +1,6 @@ from django.dispatch import receiver from django.contrib.auth.models import User -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from django_registration.signals import user_registered from notifications.signals import notify diff --git a/signbank/dictionary/admin.py b/signbank/dictionary/admin.py index f508e81b..ef9ada2e 100644 --- a/signbank/dictionary/admin.py +++ b/signbank/dictionary/admin.py @@ -9,7 +9,7 @@ from django.core.exceptions import ObjectDoesNotExist from django.db import models from django.forms import CheckboxSelectMultiple, ModelForm, Textarea -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from guardian.admin import GuardedModelAdmin from modeltranslation.admin import TranslationAdmin as ModelTranslationAdmin from reversion.admin import VersionAdmin diff --git a/signbank/dictionary/adminviews.py b/signbank/dictionary/adminviews.py index 222f1214..52d233f1 100644 --- a/signbank/dictionary/adminviews.py +++ b/signbank/dictionary/adminviews.py @@ -21,7 +21,7 @@ from django.template.loader import render_to_string from django.urls import reverse from django.utils.translation import get_language -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from django.views.generic.detail import DetailView from django.views.generic.list import ListView from django_comments.models import Comment diff --git a/signbank/dictionary/choicelists.py b/signbank/dictionary/choicelists.py index 83c3a90e..8b8365bc 100644 --- a/signbank/dictionary/choicelists.py +++ b/signbank/dictionary/choicelists.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ __author__ = 'heilniem' diff --git a/signbank/dictionary/csv_import.py b/signbank/dictionary/csv_import.py index 0bfdff69..7fde6df7 100644 --- a/signbank/dictionary/csv_import.py +++ b/signbank/dictionary/csv_import.py @@ -20,7 +20,7 @@ from django.http import HttpResponseRedirect from django.shortcuts import render, reverse from django.utils.timezone import get_current_timezone -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from django_comments.models import Comment from guardian.shortcuts import get_objects_for_user, get_perms from tagging.models import Tag, TaggedItem diff --git a/signbank/dictionary/delete.py b/signbank/dictionary/delete.py index 83677774..c0da25b5 100644 --- a/signbank/dictionary/delete.py +++ b/signbank/dictionary/delete.py @@ -2,7 +2,7 @@ from django.shortcuts import get_object_or_404 from django.core.exceptions import PermissionDenied from django.contrib import messages -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from django.http import HttpResponse, HttpResponseForbidden, HttpResponseNotAllowed from guardian.shortcuts import get_perms diff --git a/signbank/dictionary/forms.py b/signbank/dictionary/forms.py index f7e8796a..ce514368 100644 --- a/signbank/dictionary/forms.py +++ b/signbank/dictionary/forms.py @@ -5,7 +5,7 @@ from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ObjectDoesNotExist from django.db.utils import OperationalError, ProgrammingError -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from tagging.models import Tag from .models import (AllowedTags, Dataset, FieldChoice, Gloss, Lemma, GlossRelation, diff --git a/signbank/dictionary/models.py b/signbank/dictionary/models.py index 689863e9..1f0ca87c 100644 --- a/signbank/dictionary/models.py +++ b/signbank/dictionary/models.py @@ -13,7 +13,7 @@ from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned from django.db import OperationalError, models from django.urls import reverse -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from tagging.models import Tag from tagging.registry import AlreadyRegistered, register as tagging_register diff --git a/signbank/dictionary/publicviews.py b/signbank/dictionary/publicviews.py index 7f551699..ed8e1fa0 100644 --- a/signbank/dictionary/publicviews.py +++ b/signbank/dictionary/publicviews.py @@ -6,7 +6,7 @@ from django.db.models import Q, Prefetch from django.db.models.functions import Substr, Upper from django.templatetags.static import static -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from django.views.decorators.cache import cache_page from django.shortcuts import get_object_or_404 diff --git a/signbank/dictionary/templates/dictionary/paginate.html b/signbank/dictionary/templates/dictionary/paginate.html index 0994ce4b..cba7c839 100644 --- a/signbank/dictionary/templates/dictionary/paginate.html +++ b/signbank/dictionary/templates/dictionary/paginate.html @@ -1,7 +1,7 @@ {% if page_obj.paginator.num_pages > 1 %}