diff --git a/Dockerfile b/Dockerfile index c88933a..d9677aa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.9.15-alpine3.16 +FROM python:3.11-alpine3.19 ENV PIP_NO_CACHE_DIR off ENV PIP_DISABLE_PIP_VERSION_CHECK on ENV PYTHONUNBUFFERED 1 diff --git a/frontend/urls.py b/frontend/urls.py index 268cfbc..a594269 100644 --- a/frontend/urls.py +++ b/frontend/urls.py @@ -1,6 +1,6 @@ -from django.conf.urls import url +from django.urls import path from . import views urlpatterns = [ - url(r"^$", views.index), + path("", views.index), ] diff --git a/records/urls.py b/records/urls.py index 8039050..1ff914b 100644 --- a/records/urls.py +++ b/records/urls.py @@ -1,4 +1,4 @@ -from django.conf.urls import url +from django.urls import path, re_path from .views import collection from .views import record @@ -8,20 +8,20 @@ app_name = "records" urlpatterns = [ - url(r"^collection/(?P[\w\.\-]+)$", collection.getCollection, name="getCollection"), - url(r"^collection/(?P[\w\.\-]+)/update$", collection.updateCollection, name="updateCollection"), - url(r"^record/(?P\d+)$", record.getRecord, name="getRecord"), - url(r"^record/(?P\d+)/update$", record.updateRecord, name="updateRecord"), - url( + re_path(r"^collection/(?P[\w\.\-]+)$", collection.getCollection, name="getCollection"), + re_path(r"^collection/(?P[\w\.\-]+)/update$", collection.updateCollection, name="updateCollection"), + path("record/", record.getRecord, name="getRecord"), + path("record//update", record.updateRecord, name="updateRecord"), + re_path( r"^record/(?P\d+)/set/(?P\w+)/(?P\w+)$", record.setRecordListen, name="setRecordListen", ), - url(r"^artist/(?P\d+)$", artist.getArtist, name="getArtist"), - url(r"^artist/(?P\d+)/update$", artist.updateArtist, name="updateArtist"), - url(r"^artist/(?P\d+)/releases$", artist.getArtistReleases, name="getArtistReleases"), - url(r"^artist/(?P\d+)/releases/update$", artist.updateArtistReleases, name="updateArtistReleases"), - url(r"^artist/autocomplete$", artist.getArtistAutocomplete, name="getArtistAutocomplete"), - url(r"^progress$", progress.getProgress, name="getProgress"), - url(r"^rate/(?P\w+)$", rates.getRate, name="getRate"), + path("artist/", artist.getArtist, name="getArtist"), + path("artist//update", artist.updateArtist, name="updateArtist"), + path("artist//releases", artist.getArtistReleases, name="getArtistReleases"), + path("artist//releases/update", artist.updateArtistReleases, name="updateArtistReleases"), + path("artist/autocomplete", artist.getArtistAutocomplete, name="getArtistAutocomplete"), + path("progress", progress.getProgress, name="getProgress"), + re_path(r"^rate/(?P\w+)$", rates.getRate, name="getRate"), ] diff --git a/records2/settings.py b/records2/settings.py index 023fd73..2156c25 100644 --- a/records2/settings.py +++ b/records2/settings.py @@ -181,7 +181,6 @@ USE_I18N = True -USE_L10N = True USE_TZ = True diff --git a/records2/urls.py b/records2/urls.py index 0ddfc49..c61fa5f 100644 --- a/records2/urls.py +++ b/records2/urls.py @@ -13,13 +13,13 @@ 1. Import the include() function: from django.conf.urls import url, include 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) """ -from django.conf.urls import include, url +from django.urls import include, path, re_path from django.contrib import admin from django.conf import settings from django.conf.urls.static import static urlpatterns = [ - url(r"^records/", include("records.urls")), - url(r"", include("frontend.urls")), - url(r"^admin/", admin.site.urls), + path("records/", include("records.urls")), + path("", include("frontend.urls")), + re_path(r"^admin/", admin.site.urls), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) diff --git a/requirements.txt b/requirements.txt index ad68864..a4398db 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ -asgiref==3.3.2 +asgiref==3.7.2 certifi==2023.7.22 chardet==4.0.0 -Django==3.2.23 +Django==4.2.8 django-redis==5.2.0 django-appconf==1.0.5 django-imagekit==4.1.0