diff --git a/conf/urls.py b/conf/urls.py index b966b58..6a7af15 100644 --- a/conf/urls.py +++ b/conf/urls.py @@ -5,23 +5,23 @@ import sys from django.conf import settings as config -from django.conf.urls import include, url +from django.urls import include, re_path from django.views import static import {%PROJECT_ID_LOWER%}.app.urls __author__ = "Alex Laird" __copyright__ = "Copyright 2018, Helium Edu" -__version__ = "1.0.2" +__version__ = "1.3.0" urlpatterns = [ # Include app-specific URL files - url(r"^", include({%PROJECT_ID_LOWER%}.app.urls)), + re_path(r"^", include({%PROJECT_ID_LOWER%}.app.urls)), ] if config.DEBUG or "test" in sys.argv: # Ensure media files are shown properly when using a dev server urlpatterns += [ - url(r"^" + config.MEDIA_URL.lstrip("/") + "(?P.*)$", static.serve, { + re_path(r"^" + config.MEDIA_URL.lstrip("/") + "(?P.*)$", static.serve, { "document_root": config.MEDIA_ROOT}) ] diff --git a/project_id/app/urls.py b/project_id/app/urls.py index bb477be..174193c 100644 --- a/project_id/app/urls.py +++ b/project_id/app/urls.py @@ -1,4 +1,4 @@ -from django.conf.urls import url +from django.urls import re_path from rest_framework.documentation import include_docs_urls from {%PROJECT_ID_LOWER%}.app.admin import admin_site @@ -7,16 +7,16 @@ __author__ = "Alex Laird" __copyright__ = "Copyright 2019, Helium Edu" -__version__ = "1.1.0" +__version__ = "1.3.0" urlpatterns = [ # URLs for auto-generated resources - url("admin/", admin_site.urls, name="admin"), - url("docs/", include_docs_urls(title="{%PROJECT_NAME%} API Documentation"), name="docs"), + re_path("admin/", admin_site.urls, name="admin"), + re_path("docs/", include_docs_urls(title="{%PROJECT_NAME%} API Documentation"), name="docs"), ############################## # Unauthenticated URLs ############################## - url("status/", StatusResourceView.as_view({"get": "status"}), name="resource_status"), - url("info/", InfoResourceView.as_view({"get": "info"}), name="resource_info"), + re_path("status/", StatusResourceView.as_view({"get": "status"}), name="resource_status"), + re_path("info/", InfoResourceView.as_view({"get": "info"}), name="resource_info"), ] diff --git a/requirements.txt b/requirements.txt index c5b9497..4f77dd1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -django==3.2.23 +django==4.2.9 djangorestframework==3.14.0 django-pipeline==3.0.0 django-dotenv==1.4.2 @@ -8,4 +8,4 @@ mysqlclient==2.2.3 pytz==2024.1 python-dateutil==2.8.2 schedule==1.2.1 --e git+https://github.com/alexdlaird/django-health-check.git@alaird-3.5.6#egg=django-health-check +-e git+https://github.com/alexdlaird/django-health-check.git@alaird-4.0.1#egg=django-health-check