Skip to content

Commit

Permalink
Merge pull request #12 from kwangsooshin/feature/urls
Browse files Browse the repository at this point in the history
Edit: URL regex patterns
  • Loading branch information
agusmakmun authored Aug 31, 2020
2 parents 99629b6 + 69f6f48 commit bfd074b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions log_viewer/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
if django.VERSION >= (2, 0):
from django.urls import re_path
urlpatterns = [
re_path(r'^json/(?P<file_name>[\.\w-]*)/(?P<page>[0-9]+)', log_json, name='log_json_view'),
re_path(r'^json/(?P<file_name>[\.\w-]*)', log_json, name='log_json_view'),
re_path(r'^', log_viewer, name='log_file_view'),
re_path(r'^json/(?P<file_name>[\.\w-]*)/(?P<page>[0-9]+)/?$', log_json, name='log_json_view'),
re_path(r'^json/(?P<file_name>[\.\w-]*)/?$', log_json, name='log_json_view'),
re_path(r'^/?$', log_viewer, name='log_file_view'),
]
else:
from django.conf.urls import url
urlpatterns = [
url(r'^json/(?P<file_name>[\.\w-]*)/(?P<page>[0-9]+)', log_json, name='log_json_view'),
url(r'^json/(?P<file_name>[\.\w-]*)', log_json, name='log_json_view'),
url(r'^', log_viewer, name='log_file_view'),
url(r'^json/(?P<file_name>[\.\w-]*)/(?P<page>[0-9]+)/?$', log_json, name='log_json_view'),
url(r'^json/(?P<file_name>[\.\w-]*)/?$', log_json, name='log_json_view'),
url(r'^/?$', log_viewer, name='log_file_view'),
]

0 comments on commit bfd074b

Please # to comment.