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.

This commit is contained in:
Martin Green
2022-06-25 23:17:19 +01:00
parent b3d9e81499
commit 20583b04c0
9 changed files with 313 additions and 19 deletions

View File

@@ -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<subpath>.*)$', 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<path>.*)$', mapfile, name="mapfile"), # css, js, gpx
# Helpers to edit HTML
re_path(r'^image_selector/(?P<path>.*)', image_selector, name = 'image_selector'),
re_path(r'^new_image_form/(?P<path>.*)', 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