Skip to content

Commit

Permalink
updating to django 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
bryan-brancotte committed Aug 5, 2024
1 parent 54cb4b4 commit 3b187b2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
10 changes: 5 additions & 5 deletions ifbcat_api/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -571,7 +571,7 @@ def logo(self, obj):
return format_html('<center style="margin: -8px;"><img height="32px" src="' + obj.logo_url + '"/><center>')
return format_html('<center style="margin: -8px;">-<center>')

logo.short_description = format_html("<center>" + ugettext("Logo") + "<center>")
logo.short_description = format_html("<center>" + gettext("Logo") + "<center>")

def get_queryset(self, request):
return Event.annotate_is_tess_publishing(super().get_queryset(request)).annotate(
Expand Down Expand Up @@ -876,7 +876,7 @@ def update_information_from_ebi_ols(self, request, queryset):
def uri_browser(self, obj):
return format_html(f'<center><a href="{obj.edam_browser_url}" target="_blank">{obj.uri}</a></center>')

uri_browser.short_description = format_html("<center>" + ugettext("URI") + "<center>")
uri_browser.short_description = format_html("<center>" + gettext("URI") + "<center>")


@admin.register(models.EventCost)
Expand Down Expand Up @@ -1335,7 +1335,7 @@ def logo(self, obj):
return format_html('<center style="margin: -8px;"><img height="32px" src="' + obj.logo_url + '"/><center>')
return format_html('<center style="margin: -8px;">-<center>')

logo.short_description = format_html("<center>" + ugettext("Image") + "<center>")
logo.short_description = format_html("<center>" + gettext("Image") + "<center>")


class AbstractControlledVocabularyAdmin(
Expand Down Expand Up @@ -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)
Expand Down
16 changes: 8 additions & 8 deletions ifbcat_vanilla_front/urls.py
Original file line number Diff line number Diff line change
@@ -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<slug>[-\w ]+)/$', views.TeamDetailView.as_view(), name='team-detail'),
url(r'^event/$', views.EventListView.as_view(), name='event-list'),
url(r'^event/(?P<pk>\d+)/$', views.EventDetailView.as_view(), name='event-detail'),
url(r'^training/$', views.TrainingListView.as_view(), name='training-list'),
url(r'^training/(?P<pk>\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<slug>[-\w ]+)/$', views.TeamDetailView.as_view(), name='team-detail'),
path('event/', views.EventListView.as_view(), name='event-list'),
path('event/<int:pk>/', views.EventDetailView.as_view(), name='event-detail'),
path('training/', views.TrainingListView.as_view(), name='training-list'),
path('training/<int:pk>/', views.TrainingDetailView.as_view(), name='training-detail'),
]
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
biopython
Django~=3.2.12
Django~=4.2.14
djangorestframework==3.15.2
python-decouple
psycopg2
Expand Down

0 comments on commit 3b187b2

Please sign in to comment.