Skip to content

Commit

Permalink
Bump support to Django 4.x.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdlaird committed Feb 6, 2024
1 parent c410532 commit 30cc49a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions conf/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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<path>.*)$", static.serve, {
re_path(r"^" + config.MEDIA_URL.lstrip("/") + "(?P<path>.*)$", static.serve, {
"document_root": config.MEDIA_ROOT})
]
12 changes: 6 additions & 6 deletions project_id/app/urls.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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"),
]
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

0 comments on commit 30cc49a

Please sign in to comment.