summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/TESTS/test_imports.py2
-rw-r--r--core/TESTS/test_logins.py2
-rw-r--r--core/TESTS/test_parsers.py3
-rw-r--r--core/TESTS/tests.py3
-rw-r--r--core/forms.py2
-rw-r--r--core/views/caves.py9
6 files changed, 11 insertions, 10 deletions
diff --git a/core/TESTS/test_imports.py b/core/TESTS/test_imports.py
index 28bd65e..2b23dd4 100644
--- a/core/TESTS/test_imports.py
+++ b/core/TESTS/test_imports.py
@@ -8,7 +8,7 @@ The simple redirections to files which exist, e.g. in
/expoweb/
/expofiles/
/expofiles/documents/
-etc. will test fine.
+etc. using parameters in localsettings such as PHOTOS_ROOT will test fine.
But paths like this:
/survey_scans/
diff --git a/core/TESTS/test_logins.py b/core/TESTS/test_logins.py
index ef9478b..8596205 100644
--- a/core/TESTS/test_logins.py
+++ b/core/TESTS/test_logins.py
@@ -103,7 +103,7 @@ class PostTests(TestCase):
self.expedition = e
def test_file_permissions(self):
- """Expect to be allowed to write to expofiles
+ """Expect to be allowed to write to SCANS_ROOT, DRAWINGS_DATA, SURVEX_DATA, EXPOWEB
Need to login first.
"""
c = self.client
diff --git a/core/TESTS/test_parsers.py b/core/TESTS/test_parsers.py
index 70f19cd..00b565e 100644
--- a/core/TESTS/test_parsers.py
+++ b/core/TESTS/test_parsers.py
@@ -6,8 +6,7 @@ so any path that relies on data being in the database will fail.
The simple redirections to files which exist, e.g. in
/expoweb/
-/expofiles/
-/expofiles/documents/
+/photos/
etc. will test fine.
But paths like this:
diff --git a/core/TESTS/tests.py b/core/TESTS/tests.py
index 078a048..00a5021 100644
--- a/core/TESTS/tests.py
+++ b/core/TESTS/tests.py
@@ -6,8 +6,7 @@ so any path that relies on data being in the database will fail.
The simple redirections to files which exist, e.g. in
/expoweb/
-/expofiles/
-/expofiles/documents/
+/photos/
etc. will test fine.
But paths like this:
diff --git a/core/forms.py b/core/forms.py
index b68e259..a2ea45b 100644
--- a/core/forms.py
+++ b/core/forms.py
@@ -61,7 +61,7 @@ class CaveForm(ModelForm):
survex_file = forms.CharField(
required=False, label="Survex file eg. caves-1623/000/000.svx", widget=forms.TextInput(attrs={"size": "45"})
)
- url = forms.CharField(required=True, label="URL eg. 1623/000/000.html", widget=forms.TextInput(attrs={"size": "45"}))
+ url = forms.CharField(required=True, label="URL eg. 1623/000/000 (no .html)", widget=forms.TextInput(attrs={"size": "45"}))
length = forms.CharField(required=False, label="Length (m)")
depth = forms.CharField(required=False, label="Depth (m)")
extent = forms.CharField(required=False, label="Extent (m)")
diff --git a/core/views/caves.py b/core/views/caves.py
index 1ad8dcf..b5a13f4 100644
--- a/core/views/caves.py
+++ b/core/views/caves.py
@@ -281,12 +281,15 @@ def cavepage(request, karea, subpath):
accessed by kataster area number specifically
OR
accessed by cave.url specifically set in data, e.g.
- "1623/000/000.html" <= cave-data/1623-000.html
+ "1623/000/000" <= cave-data/1623-000.html
"1623/41/115.htm" <= cave-data/1623-115.html
so we have to query the database to fine the URL as we cannot rely on the url actually telling us the cave by inspection.
+
+ NOTE that old caves have ".html" (or ".htm") in the URL as they used to be actual files. But since 2006 these URLs
+ refer to virtual pages generated on the fly by troggle, so the".html" is confusing and redundant.
- There are A LOT OF URLS to e.g. /1623/161/l/rl89a.htm which are IMAGES and html files
- in cave descriptions. These need to be handled HERE
+ There are also A LOT OF URLS to e.g. /1623/161/l/rl89a.htm which are IMAGES and real html files
+ in cave descriptions. These need to be handled HERE too (accident of history).
"""
kpath = karea + subpath
# print(f" ! cavepage:'{kpath}' kataster area:'{karea}' rest of path:'{subpath}'")