From 8a9c60dbac93aa75d6d7a71c125327b9fe6e70b0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 08:49:00 +0000 Subject: [PATCH 1/5] Bump djangorestframework from 3.11.2 to 3.15.2 Bumps [djangorestframework](https://github.com/encode/django-rest-framework) from 3.11.2 to 3.15.2. - [Release notes](https://github.com/encode/django-rest-framework/releases) - [Commits](https://github.com/encode/django-rest-framework/compare/3.11.2...3.15.2) --- updated-dependencies: - dependency-name: djangorestframework dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 8dc626f..e29cab4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ biopython Django~=3.2.12 -djangorestframework==3.11.2 +djangorestframework==3.15.2 python-decouple psycopg2 psycopg2-binary From 3b187b2a35708d811770f3a7d22980ffbc04036b Mon Sep 17 00:00:00 2001 From: Bryan Brancotte Date: Mon, 5 Aug 2024 11:20:49 +0200 Subject: [PATCH 2/5] updating to django 4.2 --- ifbcat_api/admin.py | 10 +++++----- ifbcat_vanilla_front/urls.py | 16 ++++++++-------- requirements.txt | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/ifbcat_api/admin.py b/ifbcat_api/admin.py index eff5aa0..e81f32c 100644 --- a/ifbcat_api/admin.py +++ b/ifbcat_api/admin.py @@ -21,7 +21,7 @@ from django.utils import dateformat, timezone from django.utils.html import format_html from django.utils.safestring import mark_safe -from django.utils.translation import ugettext, ngettext +from django.utils.translation import gettext, ngettext from django_better_admin_arrayfield.admin.mixins import DynamicArrayMixin from rest_framework.authtoken.models import Token @@ -571,7 +571,7 @@ def logo(self, obj): return format_html('
') return format_html('
-
') - logo.short_description = format_html("
" + ugettext("Logo") + "
") + logo.short_description = format_html("
" + gettext("Logo") + "
") def get_queryset(self, request): return Event.annotate_is_tess_publishing(super().get_queryset(request)).annotate( @@ -876,7 +876,7 @@ def update_information_from_ebi_ols(self, request, queryset): def uri_browser(self, obj): return format_html(f'
{obj.uri}
') - uri_browser.short_description = format_html("
" + ugettext("URI") + "
") + uri_browser.short_description = format_html("
" + gettext("URI") + "
") @admin.register(models.EventCost) @@ -1335,7 +1335,7 @@ def logo(self, obj): return format_html('
') return format_html('
-
') - logo.short_description = format_html("
" + ugettext("Image") + "
") + logo.short_description = format_html("
" + gettext("Image") + "
") class AbstractControlledVocabularyAdmin( @@ -1592,7 +1592,7 @@ def get_readonly_fields(self, request, obj=None): # Unregister the original Token admin. -admin.site.unregister(Token) +# admin.site.unregister(Token) @admin.register(Token) diff --git a/ifbcat_vanilla_front/urls.py b/ifbcat_vanilla_front/urls.py index 66d5048..f670d20 100644 --- a/ifbcat_vanilla_front/urls.py +++ b/ifbcat_vanilla_front/urls.py @@ -1,14 +1,14 @@ -from django.conf.urls import url +from django.urls import path, re_path from ifbcat_vanilla_front import views app_name = 'vfront' urlpatterns = [ - url(r'^$', views.index, name='home'), - url(r'^platform/$', views.TeamListView.as_view(), name='team-list'), - url(r'^platform/(?P[-\w ]+)/$', views.TeamDetailView.as_view(), name='team-detail'), - url(r'^event/$', views.EventListView.as_view(), name='event-list'), - url(r'^event/(?P\d+)/$', views.EventDetailView.as_view(), name='event-detail'), - url(r'^training/$', views.TrainingListView.as_view(), name='training-list'), - url(r'^training/(?P\d+)/$', views.TrainingDetailView.as_view(), name='training-detail'), + path('', views.index, name='home'), + path('platform/', views.TeamListView.as_view(), name='team-list'), + re_path(r'^platform/(?P[-\w ]+)/$', views.TeamDetailView.as_view(), name='team-detail'), + path('event/', views.EventListView.as_view(), name='event-list'), + path('event//', views.EventDetailView.as_view(), name='event-detail'), + path('training/', views.TrainingListView.as_view(), name='training-list'), + path('training//', views.TrainingDetailView.as_view(), name='training-detail'), ] diff --git a/requirements.txt b/requirements.txt index e29cab4..55f979b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ biopython -Django~=3.2.12 +Django~=4.2.14 djangorestframework==3.15.2 python-decouple psycopg2 From 08cc77021ff1af23fa49644119e187905490976a Mon Sep 17 00:00:00 2001 From: Bryan Brancotte Date: Mon, 5 Aug 2024 11:25:18 +0200 Subject: [PATCH 3/5] add migrations after updating to django 4.2 --- ..._maintainers_alter_training_maintainers.py | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 ifbcat_api/migrations/0194_alter_event_maintainers_alter_training_maintainers.py diff --git a/ifbcat_api/migrations/0194_alter_event_maintainers_alter_training_maintainers.py b/ifbcat_api/migrations/0194_alter_event_maintainers_alter_training_maintainers.py new file mode 100644 index 0000000..1422d0d --- /dev/null +++ b/ifbcat_api/migrations/0194_alter_event_maintainers_alter_training_maintainers.py @@ -0,0 +1,34 @@ +# Generated by Django 4.2.14 on 2024-08-05 09:24 + +from django.conf import settings +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('ifbcat_api', '0193_alter_team_ifbmembership'), + ] + + operations = [ + migrations.AlterField( + model_name='event', + name='maintainers', + field=models.ManyToManyField( + blank=True, + help_text='Maintainer(s) can edit this object.', + related_name='+', + to=settings.AUTH_USER_MODEL, + ), + ), + migrations.AlterField( + model_name='training', + name='maintainers', + field=models.ManyToManyField( + blank=True, + help_text='Maintainer(s) can edit this object.', + related_name='+', + to=settings.AUTH_USER_MODEL, + ), + ), + ] From b282f933594a186e35768a0c09d31df72897929c Mon Sep 17 00:00:00 2001 From: Bryan Brancotte Date: Mon, 5 Aug 2024 13:05:10 +0200 Subject: [PATCH 4/5] typo --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e851cca..07521f3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,7 +14,7 @@ jobs: repository: IFB-ElixirFr/ifbcat-importdata token: ${{ secrets.ACCESS_TOKEN }} path: 'import_data' - - name: Run the tests inside the docker-compose with third party api calls cached + - name: Run the tests inside the docker compose with third party api calls cached run: | cp resources/default.ini local.ini docker compose build From 42cf213646a1b22d2c7731b1eae04509bfd000d1 Mon Sep 17 00:00:00 2001 From: Bryan Brancotte Date: Mon, 5 Aug 2024 13:05:18 +0200 Subject: [PATCH 5/5] add inflection --- requirements.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/requirements.txt b/requirements.txt index 55f979b..c32b509 100644 --- a/requirements.txt +++ b/requirements.txt @@ -23,4 +23,6 @@ django-extensions opencage markdown huey +# needed by openapi +inflection #end of file