diff options
author | Philip Sargent <philip.sargent@klebos.com> | 2021-05-09 00:55:37 +0100 |
---|---|---|
committer | Philip Sargent <philip.sargent@klebos.com> | 2021-05-09 00:55:37 +0100 |
commit | e42cb582c7ef32dc3163731a4f7ccae7f4529a98 (patch) | |
tree | 512440da65a442d385fe3ee9e45752d2e4063c95 /urls.py | |
parent | 39cd616c903b2fc0651e3258b26ba03ac4394d9d (diff) | |
download | troggle-e42cb582c7ef32dc3163731a4f7ccae7f4529a98.tar.gz troggle-e42cb582c7ef32dc3163731a4f7ccae7f4529a98.tar.bz2 troggle-e42cb582c7ef32dc3163731a4f7ccae7f4529a98.zip |
1988, 1989 still bad
Diffstat (limited to 'urls.py')
-rw-r--r-- | urls.py | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -39,7 +39,7 @@ which is vital to writing code for the webapp. So the URL dispatch is declarativ The API urls return TSV or JSON and are new in July 2020. """ -todo = '''Replace most re_path() with modern and simpler path() +todo = '''Replace most re_path() with modern and simpler path(). Test VERY CAREFULLY for each chnage. It is fragile. ''' # Many of these patterns do not work because troggle spent many years broken and we have @@ -115,7 +115,6 @@ trogglepatterns = [ re_path(r'^newcave/$', caves.edit_cave, name="newcave"), re_path(r'^cave/3d/(?P<cave_id>[^/]+)$', caves.cave3d, name="cave3d"), - re_path(r'^cave/entrance/([^/]+)/?$', caves.caveEntrance), re_path(r'^cave/description/([^/]+)/?$', caves.caveDescription), re_path(r'^cave/(?P<cave_id>[^/]+)/?$', caves.cave, name="cave"), re_path(r'^cave/(?P<cave_id>[^/]+)/?(?P<ent_letter>[^/])$', ent), # view_caves.ent @@ -124,15 +123,16 @@ trogglepatterns = [ # Note that urls eg '1623/161/l/rl89a.htm' are handled by cavepage which redirects them to 'expopage' # Entrances - re_path(r'^entrance/(?P<caveslug>[^/]+)/(?P<slug>[^/]+)/edit/', caves.edit_entrance, name = "editentrance"), - re_path(r'^entrance/new/(?P<caveslug>[^/]+)$', caves.edit_entrance, name = "newentrance"), + re_path(r'^cave/entrance/([^/]+)/?$', caves.caveEntrance), # lists all entrances + re_path(r'^entrance/(?P<caveslug>[^/]+)/(?P<slug>[^/]+)/edit/', caves.edit_entrance, name = "editentrance"), #edit existing entrance + re_path(r'^entrance/new/(?P<caveslug>[^/]+)$', caves.edit_entrance, name = "newentrance"), # new entrance for a cave # System admin and monitoring path('statistics', statistics.stats, name="stats"), path('stats', statistics.stats, name="stats"), path('pathsreport', statistics.pathsreport, name="pathsreport"), path('dataissues', statistics.dataissues, name="dataissues"), - path('eastings', statistics.eastings, name="eastings"), + path('eastings', statistics.eastings, name="eastings"), path('troggle', frontpage, name="frontpage"), # control panel. Shows recent actions. path('todo/<path:module>', todos, name="todos"), |