From 0a3a6934c407b7df537f97f33855802b72a2c15e Mon Sep 17 00:00:00 2001 From: Martin Green Date: Sun, 30 Apr 2023 18:54:53 +0100 Subject: [PATCH] Added some commented out lines for allowing for local development, where files are server from /usr/share/javascript or expofilescache --- urls.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/urls.py b/urls.py index 88c3578..a5d6c47 100644 --- a/urls.py +++ b/urls.py @@ -2,6 +2,8 @@ from django.conf import settings from django.contrib import admin from django.urls import include, path, re_path +from django.conf.urls.static import static + from troggle.core.views import statistics, survex from troggle.core.views.auth import expologin, expologout from troggle.core.views.caves import (cave3d, caveEntrance, caveindex, @@ -234,9 +236,10 @@ trogglepatterns = [ ] # do NOT allow DIR_ROOT prefix to all urls -urlpatterns = [ - re_path('', include(trogglepatterns)) -] + +#urlpatterns = static(settings.JSLIB_URL, document_root=settings.JSLIB_ROOT) #For development purposes, in production this should be served statically perhaps from /usr/share/javascript +#urlpatterns += static(settings.EXPOWEBCACHE_URL, document_root=settings.EXPOWEBCACHE_ROOT) #For development purposes, in production this should be served statically +urlpatterns = [re_path('', include(trogglepatterns))] # When apache is running these prempt Django so Django never sees them. # NB apache has its own ideas about mimetypes, so behaviour may not be identical for .xml files by troggle