diff options
author | Philip Sargent <philip.sargent@klebos.com> | 2021-04-27 19:02:11 +0100 |
---|---|---|
committer | Philip Sargent <philip.sargent@klebos.com> | 2021-04-27 19:02:11 +0100 |
commit | 821aaa1f66b003c34a8d568ff1dfdae057c17091 (patch) | |
tree | aeac6d9ce40cbbe91b9208af893c08d87939c04a /urls.py | |
parent | 942cbdd4b275cca45c41530977481db91fea2f51 (diff) | |
download | troggle-821aaa1f66b003c34a8d568ff1dfdae057c17091.tar.gz troggle-821aaa1f66b003c34a8d568ff1dfdae057c17091.tar.bz2 troggle-821aaa1f66b003c34a8d568ff1dfdae057c17091.zip |
Changing to new path() url function (initial)
Diffstat (limited to 'urls.py')
-rw-r--r-- | urls.py | 38 |
1 files changed, 19 insertions, 19 deletions
@@ -121,36 +121,36 @@ trogglepatterns = [ re_path(r'^entrance/new/(?P<caveslug>[^/]+)$', caves.edit_entrance, name = "newentrance"), # System admin and monitoring - re_path(r'^statistics/?$', statistics.stats, name="stats"), - re_path(r'^stats/?$', statistics.stats, name="stats"), - re_path(r'^pathsreport.*$', statistics.pathsreport, name="pathsreport"), - re_path(r'^dataissues/?$', statistics.dataissues, name="dataissues"), + path('statistics', statistics.stats, name="stats"), + path('stats', statistics.stats, name="stats"), + path('pathsreport', statistics.pathsreport, name="pathsreport"), + path('dataissues', statistics.dataissues, name="dataissues"), - re_path(r'^troggle$', frontpage, name="frontpage"), # control panel. Shows recent actions. + re_path(r'^troggle$', frontpage, name="frontpage"), # control panel. Shows recent actions. re_path(r'^todo/(?P<module>.*)$', todos, name="todos"), - re_path(r'^controlpanel/?$', controlpanel, name="controlpanel"), + re_path(r'^controlpanel/?$', controlpanel, name="controlpanel"), # The survexfile pages - re_path(r'^survexfile/(?P<survex_file>.*?)\.svx$', survex.svx, name="svx"), - re_path(r'^survexfile/(?P<survex_file>.*?)\.3d$', survex.threed, name="threed"), - re_path(r'^survexfile/(?P<survex_file>.*?)\.log$', survex.svxraw), - re_path(r'^survexfile/(?P<survex_file>.*?)\.err$', survex.err), + path('survexfile/<path:survex_file>.svx', survex.svx, name="svx"), + path('survexfile/<path:survex_file>.3d', survex.threed, name="threed"), + path('survexfile/<path:survex_file>.log', survex.svxraw, name="svxraw"), + path('survexfile/<path:survex_file>.err', survex.err, name="err"), - re_path(r'^survexfile/caves/$', survex.survexcaveslist, name="survexcaveslist"), - re_path(r'^survexfile/caves$', survex.survexcaveslist, name="survexcaveslist"), # auto slash not working - re_path(r'^survexfile/(?P<survex_cave>.*)$', survex.survexcavesingle, name="survexcavessingle"), - re_path(r'^survey_scans/$', allwallets, name="allwallets"), - re_path(r'^survey_scans/(?P<path>[^/]+)/$', singlewallet, name="singlewallet"), - re_path(r'^survey_scans/(?P<path>[^/]+)/(?P<file>[^/]+)$', - scansingle, name="scansingle"), + path('survexfile/caves', survex.survexcaveslist, name="survexcaveslist"), + path('survexfile/caves/', survex.survexcaveslist, name="survexcaveslist"), # auto slash not working + path('survexfile/<survex_cave>', survex.survexcavesingle, name="survexcavessingle"), + + path('survey_scans/', allwallets, name="allwallets"), + path('survey_scans/<path>/', singlewallet, name="singlewallet"), + path('survey_scans/<path>/<file>', scansingle, name="scansingle"), # The tunnel and therion drawings files pages re_path(r'^dwgdata/$', dwgdata, name="dwgdata"), re_path(r'^dwgdataraw/(?P<path>.+?\.xml)$', dwgfilesingle, name="dwgfilesingle"), re_path(r'^dwgdataraw/(?P<path>.+?\.th)$', dwgfilesingle, name="dwgfilesingle"), re_path(r'^dwgdataraw/(?P<path>.+?\.th2)$', dwgfilesingle, name="dwgfilesingle"), -# re_path(r'^dwgdatainfo/(?P<path>.+?\.xml)$', dwgfileinfo, name="dwgfileinfo"), # parses tunnel for info +# re_path(r'^dwgdatainfo/(?P<path>.+?\.xml)$', dwgfileinfo, name="dwgfileinfo"), # parses tunnel for info & ref to wallet re_path(r'^dwgdataraw/(?P<path>.+?\.xml)/upload$', dwgfileupload, name="dwgfileupload"), # Not working @@ -176,7 +176,7 @@ trogglepatterns = [ re_path(r'^(.*)$', expopage, name="expopage"), # CATCHALL assumed relative to EXPOWEB ] -# do not allow DIR_ROOT prefix to all urls +# do NOT allow DIR_ROOT prefix to all urls urlpatterns = [ # re_path('^%s' % settings.DIR_ROOT, include(trogglepatterns)) re_path('', include(trogglepatterns)) |