mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-15 07:47:13 +00:00
Add new per-module ToDo texts
This commit is contained in:
26
urls.py
26
urls.py
@@ -7,9 +7,9 @@ from django.contrib import admin
|
||||
from django.contrib import auth
|
||||
from django.urls import reverse, resolve
|
||||
|
||||
from troggle.core.views import other, caves, statistics, survex
|
||||
from troggle.core.views import caves, statistics, survex
|
||||
from troggle.core.views.surveys import surveyscansingle, surveyscansfolder, surveyscansfolders, dwgdata, dwgfilesingle, dwgfileupload
|
||||
from troggle.core.views.other import troggle404, frontpage
|
||||
from troggle.core.views.other import troggle404, frontpage, todos, controlpanel, frontpage, newfile, downloadlogbook, ajax_QM_number, downloadQMs
|
||||
from troggle.core.views.caves import ent, cavepage
|
||||
from troggle.core.views.logbooks import get_logbook_entries, logbookentry, logbookSearch
|
||||
from troggle.core.views.logbooks import personindex, person, get_people
|
||||
@@ -34,6 +34,9 @@ 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()
|
||||
'''
|
||||
|
||||
#handler404 = 'troggle.core.views.other.troggle404' # can't get this to work. but 404.html is default anyway
|
||||
|
||||
# Many of these patterns do not work because troggle spent many years broken and we have
|
||||
@@ -63,7 +66,6 @@ else:
|
||||
trogglepatterns = [
|
||||
re_path(r'^expofiles/', include(expofilesurls)),
|
||||
|
||||
re_path(r'^troggle$', other.frontpage, name="frontpage"), # control panel. Shows recent actions.
|
||||
re_path(r'^caves$', caves.caveindex, name="caveindex"),
|
||||
re_path(r'^indxal.htm$', caves.caveindex, name="caveindex"), # ~420 hrefs to this url in expoweb files
|
||||
re_path(r'^people/?$', personindex, name="personindex"),
|
||||
@@ -88,10 +90,10 @@ trogglepatterns = [
|
||||
|
||||
# Logbook entries
|
||||
re_path(r'^logbookentry/(?P<date>.*)/(?P<slug>.*)/?$', logbookentry,name="logbookentry"),
|
||||
re_path(r'^newfile', other.newFile, name="newFile"), # oddly broken, needs investigating more
|
||||
re_path(r'^newfile', newfile, name="newFile"), # oddly broken, needs investigating more
|
||||
re_path(r'^logbooksearch/(.*)/?$', logbookSearch),
|
||||
re_path(r'^logbook(?P<year>\d\d\d\d)\.(?P<extension>.*)/?$', other.downloadLogbook),
|
||||
re_path(r'^logbook/?$', other.downloadLogbook, name="downloadlogbook"),
|
||||
re_path(r'^logbook(?P<year>\d\d\d\d)\.(?P<extension>.*)/?$', downloadlogbook),
|
||||
re_path(r'^logbook/?$', downloadlogbook, name="downloadlogbook"),
|
||||
|
||||
# Internal. editfile.html template uses these internally
|
||||
re_path(r'^getPeople/(?P<expeditionslug>.*)', get_people, name = "get_people"),
|
||||
@@ -116,16 +118,18 @@ trogglepatterns = [
|
||||
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"),
|
||||
|
||||
|
||||
# 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"),
|
||||
|
||||
re_path(r'^controlpanel/?$', other.controlPanel, name="controlpanel"),
|
||||
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"),
|
||||
|
||||
# The survexfile pages
|
||||
re_path(r'^survexfile/(?P<survex_file>.*?)\.svx$', survex.svx, name="svx"),
|
||||
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),
|
||||
@@ -151,8 +155,8 @@ trogglepatterns = [
|
||||
# QMs pages - must precede other /caves pages
|
||||
re_path(r'^cave/qms/([^/]+)/?$', caves.caveQMs), # blank page usually
|
||||
re_path(r'^cave/(?P<cave_id>[^/]+)/(?P<year>\d\d\d\d)-(?P<qm_id>\d*)(?P<grade>[ABCDX]?)?$', caves.qm, name="qm"),
|
||||
re_path(r'^cave/(?P<cave_id>[^/]+)/qm\.csv/?$', other.downloadQMs, name="downloadqms"),
|
||||
re_path(r'^newqmnumber/?$', other.ajax_QM_number, ), # blank page if no ch given
|
||||
re_path(r'^cave/(?P<cave_id>[^/]+)/qm\.csv/?$', downloadQMs, name="downloadqms"),
|
||||
re_path(r'^newqmnumber/?$', ajax_QM_number, ), # blank page if no ch given
|
||||
# re_path(r'^downloadqms$', other.downloadQMs), # MultiValueDictKeyError
|
||||
|
||||
# Prospecting Guide document
|
||||
|
||||
Reference in New Issue
Block a user