From c03e9943c29d94db867a4ffb5f6f40a5a48cac08 Mon Sep 17 00:00:00 2001 From: Bee Webb Date: Thu, 22 Aug 2024 12:09:06 +0000 Subject: [PATCH] requirements: Update Django to latest LTS --- cove_iati/lib/exceptions.py | 2 +- cove_iati/lib/iati.py | 2 +- cove_iati/urls.py | 10 +++++----- cove_iati/views.py | 2 +- requirements.in | 2 +- requirements.txt | 12 +++++------- requirements_dev.txt | 9 ++++----- 7 files changed, 18 insertions(+), 21 deletions(-) diff --git a/cove_iati/lib/exceptions.py b/cove_iati/lib/exceptions.py index b97be5a55..90e9f77db 100644 --- a/cove_iati/lib/exceptions.py +++ b/cove_iati/lib/exceptions.py @@ -1,6 +1,6 @@ import json from libcove.lib.exceptions import CoveInputDataError -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ class UnrecognisedFileTypeXML(CoveInputDataError): diff --git a/cove_iati/lib/iati.py b/cove_iati/lib/iati.py index c78cdf069..e5fbce928 100644 --- a/cove_iati/lib/iati.py +++ b/cove_iati/lib/iati.py @@ -7,7 +7,7 @@ import requests from bdd_tester import bdd_tester from django.utils.html import format_html -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from libcove.lib.exceptions import CoveInputDataError from libcove.lib.tools import ignore_errors diff --git a/cove_iati/urls.py b/cove_iati/urls.py index e51dfd400..4e5b8b539 100644 --- a/cove_iati/urls.py +++ b/cove_iati/urls.py @@ -1,4 +1,4 @@ -from django.conf.urls import url +from django.urls import re_path from cove.urls import urlpatterns, handler500 # noqa: F401 from django.conf.urls.static import static @@ -7,10 +7,10 @@ import cove_iati.views urlpatterns = [ - url(r'^$', cove_iati.views.data_input_iati, name='index'), - url(r'^data/(.+)/(.+)$', cove_iati.views.explore_iati, name='explore_suffix'), - url(r'^data/(.+)$', cove_iati.views.explore_iati, name='explore'), - url(r'^api_test', cove_iati.views.api_test, name='api_test'), + re_path(r'^$', cove_iati.views.data_input_iati, name='index'), + re_path(r'^data/(.+)/(.+)$', cove_iati.views.explore_iati, name='explore_suffix'), + re_path(r'^data/(.+)$', cove_iati.views.explore_iati, name='explore'), + re_path(r'^api_test', cove_iati.views.api_test, name='api_test'), ] + urlpatterns urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) diff --git a/cove_iati/views.py b/cove_iati/views.py index 06706b581..76cc9ac70 100644 --- a/cove_iati/views.py +++ b/cove_iati/views.py @@ -10,7 +10,7 @@ from django.conf import settings from django.http import HttpResponse, HttpResponseBadRequest from django.shortcuts import render -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http import require_POST import iatiutils.merge_indicator diff --git a/requirements.in b/requirements.in index e490a0f56..24dadb9a7 100644 --- a/requirements.in +++ b/requirements.in @@ -1,4 +1,4 @@ -Django>3.2,<3.3 +Django>4.2,<4.3 #^^ rq.filter: <1.12 flattentool>=0.17.2 libcove diff --git a/requirements.txt b/requirements.txt index 3d9263a59..4295aade7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -44,17 +44,17 @@ dealer==2.1.0 # via -r requirements.in defusedxml==0.7.1 # via odfpy -django==3.2.25 +django==4.2.15 # via # -r requirements.in # django-bootstrap3 # django-debug-toolbar # libcoveweb -django-bootstrap3==23.6 +django-bootstrap3==24.2 # via # -r requirements.in # libcoveweb -django-debug-toolbar==4.3.0 +django-debug-toolbar==4.4.6 # via -r requirements.in django-environ==0.11.2 # via -r requirements.in @@ -122,9 +122,7 @@ pycparser==2.22 python-dateutil==2.9.0.post0 # via -r requirements.in pytz==2024.1 - # via - # django - # flattentool + # via flattentool rangedict==0.1.7 # via -r requirements.in referencing==0.35.1 @@ -182,7 +180,7 @@ urllib3==2.2.2 # sentry-sdk webencodings==0.5.1 # via bleach -werkzeug==3.0.3 +werkzeug==3.0.4 # via libcoveweb xmltodict==0.13.0 # via diff --git a/requirements_dev.txt b/requirements_dev.txt index 7a3af9387..1dd83a76a 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -80,17 +80,17 @@ defusedxml==0.7.1 # via # -r requirements.txt # odfpy -django==3.2.25 +django==4.2.15 # via # -r requirements.txt # django-bootstrap3 # django-debug-toolbar # libcoveweb -django-bootstrap3==23.6 +django-bootstrap3==24.2 # via # -r requirements.txt # libcoveweb -django-debug-toolbar==4.3.0 +django-debug-toolbar==4.4.6 # via -r requirements.txt django-environ==0.11.2 # via -r requirements.txt @@ -238,7 +238,6 @@ python-dateutil==2.9.0.post0 pytz==2024.1 # via # -r requirements.txt - # django # flattentool rangedict==0.1.7 # via -r requirements.txt @@ -363,7 +362,7 @@ webencodings==0.5.1 # bleach websocket-client==1.8.0 # via selenium -werkzeug==3.0.3 +werkzeug==3.0.4 # via # -r requirements.txt # libcoveweb