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
22
33from pattern_library import get_pattern_template_suffix , views
44
55app_name = 'pattern_library'
66urlpatterns = [
77 # 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 (
1010 r'^pattern/(?P<pattern_template_name>[\w./-]+%s)$' % (
1111 get_pattern_template_suffix ()
1212 ),
1515 ),
1616
1717 # iframe rendering
18- url (
18+ re_path (
1919 r'^render-pattern/(?P<pattern_template_name>[\w./-]+%s)$' % (
2020 get_pattern_template_suffix ()
2121 ),
Original file line number Diff line number Diff line change 11from django .conf import settings
2- from django .conf . urls import include , url
2+ from django .urls import include , path
33
44from pattern_library import urls as pattern_library_urls
55
66if settings .GITHUB_PAGES_EXPORT :
77 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 )),
99 ]
1010else :
1111 urlpatterns = [
12- url ( r'^ pattern-library/' , include (pattern_library_urls )),
12+ path ( ' pattern-library/' , include (pattern_library_urls )),
1313 ]
You can’t perform that action at this time.
0 commit comments