summaryrefslogtreecommitdiffstats
path: root/urls.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@klebos.com>2021-04-22 02:45:28 +0100
committerPhilip Sargent <philip.sargent@klebos.com>2021-04-22 02:45:28 +0100
commit8f89b022c78a6d2d5e1f87cd6d0127fefde7a27f (patch)
tree0334d72890765dc849ed368181965f03207951ad /urls.py
parent74403d28e9fc5aca83705c3cb749ba932bcce259 (diff)
downloadtroggle-8f89b022c78a6d2d5e1f87cd6d0127fefde7a27f.tar.gz
troggle-8f89b022c78a6d2d5e1f87cd6d0127fefde7a27f.tar.bz2
troggle-8f89b022c78a6d2d5e1f87cd6d0127fefde7a27f.zip
drawing file upload form working
Diffstat (limited to 'urls.py')
-rw-r--r--urls.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/urls.py b/urls.py
index 23e21e6..db9894e 100644
--- a/urls.py
+++ b/urls.py
@@ -1,4 +1,5 @@
from django.conf import settings
+from django.urls import path
from django.conf.urls import url, include, re_path
from django.views.generic.base import RedirectView
from django.views.generic.edit import UpdateView
@@ -9,7 +10,8 @@ from django.urls import reverse, resolve
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, todos, controlpanel, frontpage, newfile, downloadlogbook, ajax_QM_number, downloadQMs
+from troggle.core.views.other import troggle404, frontpage, todos, controlpanel, frontpage, newfile, simpleupload
+from troggle.core.views.other import 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
@@ -73,6 +75,8 @@ trogglepatterns = [
re_path(r'^admin/doc/', include('django.contrib.admindocs.urls')), # needs docutils Python module (http://docutils.sf.net/).
re_path(r'^admin/', admin.site.urls), # includes admin login & logout urls
+ path('upload', simpleupload, name='simpleupload'), # includes admin login & logout urls
+
# setting LOGIN_URL = '/accounts/login/' is default
# url ENDS WITH this string
re_path(r'logout/$', expologout, name='expologout'), # higher precedence than /accounts/logout
@@ -83,7 +87,7 @@ trogglepatterns = [
re_path(r'^person/(?P<first_name>[A-Z]*[a-z\-\'&;]*)[^a-zA-Z]*(?P<last_name>[a-z\-\']*[^a-zA-Z]*[\-]*[A-Z]*[a-zA-Z\-&;]*)/?', person, name="person"),
re_path(r'^personexpedition/(?P<first_name>[A-Z]*[a-z&;]*)[^a-zA-Z]*(?P<last_name>[A-Z]*[a-zA-Z&;]*)/(?P<year>\d+)/?$', personexpedition, name="personexpedition"),
-# Expedition master page
+# Expedition master page & API exports
re_path(r'^expedition/(\d+)$', expedition, name="expedition"),
re_path(r'^api/expeditions_tsv$', Expeditions_tsvListView.as_view()),
re_path(r'^api/expeditions_json$', Expeditions_jsonListView.as_view()),
@@ -161,7 +165,7 @@ trogglepatterns = [
# Prospecting Guide document
re_path(r'^prospecting_guide/$', prospecting),
- re_path(r'^prospecting/(?P<name>[^.]+).png$', prospecting_image, name="prospecting_image"),
+# re_path(r'^prospecting/(?P<name>[^.]+).png$', prospecting_image, name="prospecting_image"), broken, won't repair.
# This next set are all intercepted by Apache, if it is running.
re_path(r'^photos/(?P<subpath>.*)$', mediapage, {'doc_root': settings.PHOTOS_ROOT}, name="mediapage"), # photo galleries