Skip to content

Commit f668449

Browse files
committed
Update url matching for django 4.2
1 parent 10930db commit f668449

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

pgcommitfest/urls.py

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

44
import pgcommitfest.commitfest.views as views
@@ -14,44 +14,44 @@
1414

1515

1616
urlpatterns = [
17-
url(r'^$', views.home),
18-
url(r'^activity(?P<rss>\.rss)?/', views.activity),
19-
url(r'^(\d+)/$', views.commitfest),
20-
url(r'^(open|inprogress)/$', views.redir),
21-
url(r'^(?P<cfid>\d+)/activity(?P<rss>\.rss)?/$', views.activity),
22-
url(r'^(\d+)/(\d+)/$', views.patch),
23-
url(r'^(\d+)/(\d+)/edit/$', views.patchform),
24-
url(r'^(\d+)/new/$', views.newpatch),
25-
url(r'^(\d+)/(\d+)/status/(review|author|committer)/$', views.status),
26-
url(r'^(\d+)/(\d+)/close/(reject|withdrawn|feedback|committed|next)/$', views.close),
27-
url(r'^(\d+)/(\d+)/reviewer/(become|remove)/$', views.reviewer),
28-
url(r'^(\d+)/(\d+)/committer/(become|remove)/$', views.committer),
29-
url(r'^(\d+)/(\d+)/(un)?subscribe/$', views.subscribe),
30-
url(r'^(\d+)/(\d+)/(comment|review)/', views.comment),
31-
url(r'^(\d+)/send_email/$', views.send_email),
32-
url(r'^(\d+)/\d+/send_email/$', views.send_email),
33-
url(r'^(\d+)/reports/authorstats/$', reports.authorstats),
34-
url(r'^search/$', views.global_search),
35-
url(r'^ajax/(\w+)/$', ajax.main),
36-
url(r'^lookups/user/$', lookups.userlookup),
37-
url(r'^thread_notify/$', views.thread_notify),
17+
re_path(r'^$', views.home),
18+
re_path(r'^activity(?P<rss>\.rss)?/', views.activity),
19+
re_path(r'^(\d+)/$', views.commitfest),
20+
re_path(r'^(open|inprogress)/$', views.redir),
21+
re_path(r'^(?P<cfid>\d+)/activity(?P<rss>\.rss)?/$', views.activity),
22+
re_path(r'^(\d+)/(\d+)/$', views.patch),
23+
re_path(r'^(\d+)/(\d+)/edit/$', views.patchform),
24+
re_path(r'^(\d+)/new/$', views.newpatch),
25+
re_path(r'^(\d+)/(\d+)/status/(review|author|committer)/$', views.status),
26+
re_path(r'^(\d+)/(\d+)/close/(reject|withdrawn|feedback|committed|next)/$', views.close),
27+
re_path(r'^(\d+)/(\d+)/reviewer/(become|remove)/$', views.reviewer),
28+
re_path(r'^(\d+)/(\d+)/committer/(become|remove)/$', views.committer),
29+
re_path(r'^(\d+)/(\d+)/(un)?subscribe/$', views.subscribe),
30+
re_path(r'^(\d+)/(\d+)/(comment|review)/', views.comment),
31+
re_path(r'^(\d+)/send_email/$', views.send_email),
32+
re_path(r'^(\d+)/\d+/send_email/$', views.send_email),
33+
re_path(r'^(\d+)/reports/authorstats/$', reports.authorstats),
34+
re_path(r'^search/$', views.global_search),
35+
re_path(r'^ajax/(\w+)/$', ajax.main),
36+
re_path(r'^lookups/user/$', lookups.userlookup),
37+
re_path(r'^thread_notify/$', views.thread_notify),
3838

3939
# Auth system integration
40-
url(r'^(?:account/)?login/?$', pgcommitfest.auth.login),
41-
url(r'^(?:account/)?logout/?$', pgcommitfest.auth.logout),
42-
url(r'^auth_receive/$', pgcommitfest.auth.auth_receive),
43-
url(r'^auth_api/$', pgcommitfest.auth.auth_api),
40+
re_path(r'^(?:account/)?login/?$', pgcommitfest.auth.login),
41+
re_path(r'^(?:account/)?logout/?$', pgcommitfest.auth.logout),
42+
re_path(r'^auth_receive/$', pgcommitfest.auth.auth_receive),
43+
re_path(r'^auth_api/$', pgcommitfest.auth.auth_api),
4444

4545
# Account management
46-
url(r'^account/profile/$', pgcommitfest.userprofile.views.userprofile),
46+
re_path(r'^account/profile/$', pgcommitfest.userprofile.views.userprofile),
4747

4848
# Examples:
49-
# url(r'^$', 'pgpgcommitfest.commitfest.views.home', name='home),
50-
# url(r'^pgcommitfest/', include('pgcommitfest.foo.urls)),
49+
# re_path(r'^$', 'pgpgcommitfest.commitfest.views.home', name='home),
50+
# re_path(r'^pgcommitfest/', include('pgcommitfest.foo.urls)),
5151

5252
# Uncomment the admin/doc line below to enable admin documentation:
53-
# url(r'^admin/doc/', include('django.contrib.admindocs.urls)),
53+
# re_path(r'^admin/doc/', include('django.contrib.admindocs.urls)),
5454

5555
# Uncomment the next line to enable the admin:
56-
url(r'^admin/', admin.site.urls),
56+
re_path(r'^admin/', admin.site.urls),
5757
]

0 commit comments

Comments
 (0)