Skip to content

Commit 5bb1475

Browse files
committed
Django 4 fixes
1 parent 2240543 commit 5bb1475

4 files changed

Lines changed: 72 additions & 50 deletions

File tree

poetry.lock

Lines changed: 67 additions & 45 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ classifiers = [
1919
[tool.poetry.dependencies]
2020
python = "^3.6"
2121
djangorestframework = "^3.0"
22-
Django = "^2.0"
22+
Django = "2.2 || ^3.2 || ^4.0"
2323
celery = ">=4"
2424
six = "^1.16.0"
2525

task_api/urls.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from django.conf.urls import url, include
1+
from django.urls import re_path, include
22
from rest_framework.routers import DefaultRouter
33

44
from task_api.views import TaskInfoViewSet
@@ -7,5 +7,5 @@
77
router.register(r'tasks', TaskInfoViewSet)
88

99
urlpatterns = [
10-
url(r'^', include(router.urls))
10+
re_path(r'^', include(router.urls))
1111
]

tests/urls.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from django.conf.urls import url, include
1+
from django.urls import re_path, include
22

33
urlpatterns = [
4-
url(r'^', include('task_api.urls')),
4+
re_path(r'^', include('task_api.urls')),
55
]

0 commit comments

Comments
 (0)