Skip to content

Commit 347f393

Browse files
committed
Django-upgrade to 4.2
1 parent 4956998 commit 347f393

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

tests/testapp/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
default_app_config = 'tests.testapp.apps.TestAppConfig'

tests/testapp/urls.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from django import forms
2-
from django.conf.urls import include, url
2+
from django.urls import include, path, re_path
33
from django.contrib import admin
44
from django.views.generic import FormView
55
from django.conf import settings
@@ -18,8 +18,8 @@ class EditorView(FormView):
1818

1919

2020
urlpatterns = [
21-
url(r'^admin/', admin.site.urls),
22-
url(r'^trix/', include('trix.urls')),
23-
url(r'^$', EditorView.as_view()),
21+
re_path(r'^admin/', admin.site.urls),
22+
path('trix/', include('trix.urls')),
23+
path('', EditorView.as_view()),
2424

2525
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

trix/urls.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
from django.conf.urls import include, url
1+
from django.urls import path
22
from .views import UploadTrixAttachment
33

44

55
urlpatterns = [
6-
url(r'^attachment/$', UploadTrixAttachment.as_view()),
6+
path('attachment/', UploadTrixAttachment.as_view()),
77
]

0 commit comments

Comments
 (0)