File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
debug_toolbar_user_switcher Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 40
40
from django import VERSION
41
41
from django .conf import settings
42
42
from django .http import HttpResponseForbidden
43
- from django .conf . urls import url
43
+ from django .urls import re_path , path
44
44
from django .template .loader import render_to_string
45
- from django .utils .translation import ugettext_lazy as _
45
+ from django .utils .translation import gettext_lazy as _
46
46
47
47
from django .contrib .auth import get_user_model
48
48
@@ -113,11 +113,11 @@ def process_request(self, request):
113
113
@classmethod
114
114
def get_urls (cls ):
115
115
return (
116
- url ( r"^ users/login/$ " , views .login_form , name = "debug-userpanel-login-form" ),
117
- url (
116
+ path ( " users/login/" , views .login_form , name = "debug-userpanel-login-form" ),
117
+ re_path (
118
118
r"^users/login/(?P<pk>-?\d+)$" ,
119
119
views .login ,
120
120
name = "debug-userpanel-login" ,
121
121
),
122
- url ( r"^ users/logout$ " , views .logout , name = "debug-userpanel-logout" ),
122
+ path ( " users/logout" , views .logout , name = "debug-userpanel-logout" ),
123
123
)
You can’t perform that action at this time.
0 commit comments