File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1
- from django .conf . urls import url
1
+ from django .urls import re_path
2
2
3
3
from pattern_library import get_pattern_template_suffix , views
4
4
5
5
app_name = 'pattern_library'
6
6
urlpatterns = [
7
7
# UI
8
- url (r'^$' , views .IndexView .as_view (), name = 'index' ),
9
- url (
8
+ re_path (r'^$' , views .IndexView .as_view (), name = 'index' ),
9
+ re_path (
10
10
r'^pattern/(?P<pattern_template_name>[\w./-]+%s)$' % (
11
11
get_pattern_template_suffix ()
12
12
),
15
15
),
16
16
17
17
# iframe rendering
18
- url (
18
+ re_path (
19
19
r'^render-pattern/(?P<pattern_template_name>[\w./-]+%s)$' % (
20
20
get_pattern_template_suffix ()
21
21
),
Original file line number Diff line number Diff line change 1
1
from django .conf import settings
2
- from django .conf . urls import include , url
2
+ from django .urls import include , path
3
3
4
4
from pattern_library import urls as pattern_library_urls
5
5
6
6
if settings .GITHUB_PAGES_EXPORT :
7
7
urlpatterns = [
8
- url ( r'^ django-pattern-library/demo/pattern-library/' , include (pattern_library_urls )),
8
+ path ( ' django-pattern-library/demo/pattern-library/' , include (pattern_library_urls )),
9
9
]
10
10
else :
11
11
urlpatterns = [
12
- url ( r'^ pattern-library/' , include (pattern_library_urls )),
12
+ path ( ' pattern-library/' , include (pattern_library_urls )),
13
13
]
You can’t perform that action at this time.
0 commit comments