From 20583b04c0c1a826aaddbf0342f4369a206dae2d Mon Sep 17 00:00:00 2001 From: Martin Green Date: Sat, 25 Jun 2022 23:17:19 +0100 Subject: Allowed user to select/upload images when editing. When uploaded thumbnails and description pages are automatically created. Git commiting can now handle multiple files at once. --- urls.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'urls.py') diff --git a/urls.py b/urls.py index da420a0..5f5a711 100644 --- a/urls.py +++ b/urls.py @@ -23,6 +23,7 @@ from troggle.core.views.statistics import pathsreport, stats, dataissues from troggle.core.views.expo import expofiles_redirect, expofilessingle, expopage, editexpopage, mediapage, map, mapfile from troggle.core.views.survex import survexcaveslist, survexcavesingle, svx from troggle.core.views.auth import expologin, expologout +from troggle.core.views.editor_helpers import image_selector, new_image_form """This sets the actualurlpatterns[] and urlpatterns[] lists which django uses to resolve urls - in both directions as these are declarative. @@ -190,6 +191,11 @@ trogglepatterns = [ re_path(r'^/loser/(?P.*)$', mediapage, {'doc_root': settings.SURVEX_DATA}, name="mediapage"), # Oddly not working !? re_path(r'^map/map.html', map, name="map"), # Redirects to OpenStreetMap JavaScript re_path(r'^map/(?P.*)$', mapfile, name="mapfile"), # css, js, gpx + +# Helpers to edit HTML + re_path(r'^image_selector/(?P.*)', image_selector, name = 'image_selector'), + re_path(r'^new_image_form/(?P.*)', new_image_form, name = 'new_image_form'), + # Final catchall which also serves expoweb handbook pages and images re_path(r'^(.*)$', expopage, name="expopage"), # CATCHALL assumed relative to EXPOWEB -- cgit v1.2.3