diff options
Diffstat (limited to 'urls.py')
-rw-r--r-- | urls.py | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -8,7 +8,7 @@ from django.contrib import auth from django.urls import path, reverse, resolve from troggle.core.views import statistics, survex -from troggle.core.views.scans import scansingle, allwallets +from troggle.core.views.scans import scansingle, allwallets, cavewallets from troggle.core.views.drawings import dwgallfiles, dwgfilesingle from troggle.core.views.uploads import dwgupload, scanupload, photoupload from troggle.core.views.other import troggle404, frontpage, todos, controlpanel, frontpage @@ -133,8 +133,7 @@ trogglepatterns = [ re_path(r'^(?P<slug>[^/]+)_cave_edit/$', edit_cave, name="edit_cave"), # edit_cave needed by cave.html template for url matching re_path(r'^(.*)_edit$', editexpopage, name="editexpopage"), re_path(r'^(?P<karea>\d\d\d\d)(?P<subpath>.*)$', cavepage, name="cavepage"), # shorthand /1623/264 or 1623/161/top.htm - # Note that urls eg '/1623/161/l/rl89a.htm' are handled by cavepage which redirects them to 'expopage' - # Note that _edit$ for a cave description page in a subfolder e.g. /1623/204/204.html_edit gets caught here and breaks with 404 + # Note that urls eg '/1623/161/l/rl89a.htm' are handled by cavepage which redirects them to 'expopage' # Note that _edit$ for a cave description page in a subfolder e.g. /1623/204/204.html_edit gets caught here and breaks with 404 # Entrances re_path(r'^cave/entrance/([^/]+)/?$', caveEntrance), # lists all entrances !!!BAD, local links fail @@ -168,7 +167,8 @@ trogglepatterns = [ # The survey scans in the wallets. This short-cuts SCANS_URL which is not actually used anywhere! path('survey_scans/', allwallets, name="allwallets"), path('survey_scans/<path:path>/', scanupload, name="singlewallet"), # replaced singlewallet() - path('survey_scans/<path:path>/<file>', scansingle, name="scansingle"), + path('survey_scans/<path:path>/<file>', scansingle, name="scansingle"), # works, but html href goes direct to /expofiles/ too + re_path(r'^cave/scans/(?P<cave_id>[^/]+)$', cavewallets, name="cavewallets"), # like allwallets, but for just one cave # The tunnel and therion drawings files pages path('dwgfiles', dwgallfiles, name="dwgallfiles"), @@ -176,7 +176,7 @@ trogglepatterns = [ path('dwgdataraw/<path:path>', dwgfilesingle, name="dwgfilesingle"), # QMs pages - must precede other /caves pages? - re_path(r'^cave/qms/([^/]+)/?$', caveQMs, name="caveQMs"), # Fixed. July 2022 + re_path(r'^cave/qms/([^/]+)/?$', caveQMs, name="caveQMs"), re_path(r'^cave/qms/(?P<cave_id>[^/]+)/(?P<year>\d\d\d\d)-(?P<qm_id>\d*)(?P<grade>[ABCDXV\?]?)-?(?P<blockname>[a-zA-Z]+.*)?$', qm, name="qm"), # Dogs breakfast # the resolution of a QM uses several fields together, there is no clean slug field. Artefact of history. |