1
1
from django .conf import settings
2
- from django .conf .urls import include , url
2
+ from django .conf .urls import include
3
3
from django .contrib .admin .sites import AdminSite , AlreadyRegistered , NotRegistered
4
4
from django .contrib .admin .sites import site as default_site
5
5
from django .contrib .auth import get_user_model
6
6
from django .shortcuts import redirect
7
+ from django .urls import re_path
7
8
8
9
from mezzanine .utils .importing import import_dotted_path
9
10
@@ -71,12 +72,12 @@ def urls(self):
71
72
# doesn't provide), so that we can target it in the
72
73
# ADMIN_MENU_ORDER setting, allowing each view to correctly
73
74
# highlight its left-hand admin nav item.
74
- url (
75
+ re_path (
75
76
r"^media-library/$" ,
76
77
lambda r : redirect ("fb_browse" ),
77
78
name = "media-library" ,
78
79
),
79
- url (r"^media-library/" , include (fb_urls )),
80
+ re_path (r"^media-library/" , include (fb_urls )),
80
81
]
81
82
82
83
# Give the urlpattern for the user password change view an
@@ -88,7 +89,7 @@ def urls(self):
88
89
if user_change_password :
89
90
bits = (User ._meta .app_label , User ._meta .object_name .lower ())
90
91
urls += [
91
- url (
92
+ re_path (
92
93
r"^%s/%s/(\d+)/password/$" % bits ,
93
94
self .admin_view (user_change_password ),
94
95
name = "user_change_password" ,
@@ -102,13 +103,13 @@ def urls(self):
102
103
from mezzanine .generic .views import admin_keywords_submit
103
104
104
105
urls += [
105
- url (
106
+ re_path (
106
107
r"^admin_keywords_submit/$" ,
107
108
admin_keywords_submit ,
108
109
name = "admin_keywords_submit" ,
109
110
),
110
- url (r"^asset_proxy/$" , static_proxy , name = "static_proxy" ),
111
- url (
111
+ re_path (r"^asset_proxy/$" , static_proxy , name = "static_proxy" ),
112
+ re_path (
112
113
r"^displayable_links.js$" ,
113
114
displayable_links_js ,
114
115
name = "displayable_links_js" ,
@@ -118,11 +119,11 @@ def urls(self):
118
119
from mezzanine .pages .views import admin_page_ordering
119
120
120
121
urls += [
121
- url (
122
+ re_path (
122
123
r"^admin_page_ordering/$" ,
123
124
admin_page_ordering ,
124
125
name = "admin_page_ordering" ,
125
126
)
126
127
]
127
128
128
- return urls + [url (r"" , super ().urls )]
129
+ return urls + [re_path (r"" , super ().urls )]
0 commit comments