From a0243c030e21a6594f6f422fd22e0c3b2026dd40 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Sat, 1 Feb 2025 17:49:02 +0000 Subject: [PATCH] progress on URLS --- core/views/cave_kataster.py | 1 + templates/cave_kataster.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/core/views/cave_kataster.py b/core/views/cave_kataster.py index cbfe3b3..e5a3ea3 100644 --- a/core/views/cave_kataster.py +++ b/core/views/cave_kataster.py @@ -67,6 +67,7 @@ def kataster(request, slug): mvscript += f'sed -i "//s//{knum}/" {cavefilename}\n' mvscript += f'sed -i "//s/[^<]*/caves-{cave.areacode}\/{knum}\/{knum}.svx/" {cavefilename}\n' mvscript += f'sed -i "//s/{str(cave)}/{cave.areacode}-{knum}/" {cavefilename}\n' + mvscript += f'sed -i "/href=\|src=/s/\/{cave.areacode}\/{cave.unofficial_number}\//\/{cave.areacode}\/{knum}\//g" {cavefilename}\n' mvscript += f"mv {cavefilename} {target}.html\n" diff --git a/templates/cave_kataster.html b/templates/cave_kataster.html index 19a1480..a00a91f 100644 --- a/templates/cave_kataster.html +++ b/templates/cave_kataster.html @@ -66,7 +66,7 @@ This cave needs to be "katastered". If you have the new number issued by the Aus [ TO DO ]

    -
  • Edit all the 'href=' URLS (if they exist) inside all the cave_data and entrance_data files descriptive text to refer to the new directory +
  • Edit all the 'href=' and 'src=' URLS (if they exist) inside all the cave_data and entrance_data files descriptive text to refer to the new directory
  • Rename the directory (if it exists) inside the areacode directory, e.g. rename /{{cave.areacode}}/{{cave.unofficial_number}}/ as /{{cave.areacode}}/{{knum}}/ (if {{knum}} is the correct new kataster number). Do this last.