diff options
-rw-r--r-- | _cave-fixopenqms.html | 131 | ||||
-rw-r--r-- | _cave-fixqms.html | 131 | ||||
-rw-r--r-- | core/TESTS/test_caves.py | 11 |
3 files changed, 1 insertions, 272 deletions
diff --git a/_cave-fixopenqms.html b/_cave-fixopenqms.html deleted file mode 100644 index 4c25cee..0000000 --- a/_cave-fixopenqms.html +++ /dev/null @@ -1,131 +0,0 @@ -<!DOCTYPE html> -<!-- base.html - this text visible because this template has been included --> -<html lang="en"> -<head> -<script>document.interestCohort = null;</script> <!-- Turn off Google FLoC --> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<link rel="stylesheet" type="text/css" href="/site_media/css/trog3.css" title="troggle-style"/> -<title>Troggle Error - Bad Slug</title> - - -</head> -<body> - -<div id="header"> - <h1>CUCC Expeditions to Austria: 1976 - 2022</h1> - <div id="editLinks"> - <a href="/">Home</a> | - <a id="cuccLink" href="http://camcaving.uk/">CUCC</a> | - <a id="expoWebsiteLink" href="http://expo.survex.com">expo.survex</a> | - <a id="handbook" href="/handbook/computing/onlinesystems.html">Handbook</a> | - <a href='/accounts/login/'>Log in</a> - - - </div> -</div> -<div class="toolbarlinks"> - <a href="/survexfile/caves-1623/264/264.svx">264</a> | - <a href="/survexfile/caves-1623/290/290.svx">290</a> | - <a href="/survexfile/caves-1626/359/359.svx">359</a> | - <a href="/survexfile/">Survex</a> | - <a href="/survexfile/caves/">All Survex</a> | - <a href="/survey_scans/">Scans</a> | - <a href="/walletedit/">Upload Scans</a> | - <a href="/dwgfiles/">Drawings</a> | - <a href="/dwgupload/">Upload Drawings</a> | - <a href="/photoupload/">Upload Photos</a> | - <a href="/1623/290/290">290 (FGH)</a> | - <a href="/1623/264/264.html">264 (Balkonhöhle)</a> | - <br> - - <a href="/dataissues">Data Issues</a> | - <a href="/handbook/computing/todo-data.html">tasks to do </a> | - <a id="cavesLink" href="/indxal.htm">caves</a> | - <a id="qmsLink" href="/cave/qms/1623-290">QMs</a> | - <a id="entsLink" href="/eastings">ents</a> | - <a id="folklink" href="/folk">expoers</a> | - <a id="caversLink" href="/people">survey lengths</a> | - <a href="/stats">statistics</a> | - <a href="/wallets/year/2022">Wallets(2022)</a> | - <a href="/expedition/2022">Expo(2022)</a> | - <a href="/controlpanel">Control panel</a> | - -</div> - -<div id="nav"> - - <!-- Not used any more? --> - -</div> - -<div id="content" > - - - - - <div id="related"> - - - </div> - - -<div class='middle'> - <h2>Bad Slug Error</h2> -</div> - - -<div class='middle3 login'> - <div class='space'></div> - <div class='align-center'> - <h3>There has been a Troggle error. </h3> - <h4> - A Cave, Entrance or QM has been referred to using a label (a 'slug') which does not work. - <p>This is the bad slug: - - <font color="red"> - - 1623-284 - from caveQMs() - - </font> - <p> - This is the previous page which had the bad slug reference on it: <font color="red"> -<script type="text/javascript"> - document.write(document.referrer); -</script> -</font> - </h4> - <p> -<p>It is also possible that the cave description page is being viewed using an alternative URL, -so that the local links in the page to other parts of the cave do not work. -<br> -e.g. /cave/1623-161 is not the correct way of looking at Kaninchenhohle, -<br> -you should be using <br> -/1623/161/top.htm instead. -<p>If that is the case, tell a nerd that we haven't fixed the fault that we thought we had fixed. - - <div class='space'><p> </div> - - <h3>What you should do now</h3> - <p>Please report the error by emailing the nerds at - <a href="mailto:expo-tech@lists.wookware.org">expo-tech@lists.wookware.org</a> with this information: - <ol> - <li>The bad slug text written in <font color="red">red</font> above. - <li>The previous page URL, also written in <font color="red">red</font> above - <li>Go back to this previous page <script type="text/javascript"> - document.write("<a href='",document.referrer,"'>",document.referrer,"</a>"); - </script> - and see if you can tell whether the bad slug was in HTML text which had been written manually, or whether it appeared to be a programming error. - </ol> - - - </div> -</div> -</div> - - -</div> -<div class="footer"> -</div> -</body> -</html> diff --git a/_cave-fixqms.html b/_cave-fixqms.html deleted file mode 100644 index 4c25cee..0000000 --- a/_cave-fixqms.html +++ /dev/null @@ -1,131 +0,0 @@ -<!DOCTYPE html> -<!-- base.html - this text visible because this template has been included --> -<html lang="en"> -<head> -<script>document.interestCohort = null;</script> <!-- Turn off Google FLoC --> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<link rel="stylesheet" type="text/css" href="/site_media/css/trog3.css" title="troggle-style"/> -<title>Troggle Error - Bad Slug</title> - - -</head> -<body> - -<div id="header"> - <h1>CUCC Expeditions to Austria: 1976 - 2022</h1> - <div id="editLinks"> - <a href="/">Home</a> | - <a id="cuccLink" href="http://camcaving.uk/">CUCC</a> | - <a id="expoWebsiteLink" href="http://expo.survex.com">expo.survex</a> | - <a id="handbook" href="/handbook/computing/onlinesystems.html">Handbook</a> | - <a href='/accounts/login/'>Log in</a> - - - </div> -</div> -<div class="toolbarlinks"> - <a href="/survexfile/caves-1623/264/264.svx">264</a> | - <a href="/survexfile/caves-1623/290/290.svx">290</a> | - <a href="/survexfile/caves-1626/359/359.svx">359</a> | - <a href="/survexfile/">Survex</a> | - <a href="/survexfile/caves/">All Survex</a> | - <a href="/survey_scans/">Scans</a> | - <a href="/walletedit/">Upload Scans</a> | - <a href="/dwgfiles/">Drawings</a> | - <a href="/dwgupload/">Upload Drawings</a> | - <a href="/photoupload/">Upload Photos</a> | - <a href="/1623/290/290">290 (FGH)</a> | - <a href="/1623/264/264.html">264 (Balkonhöhle)</a> | - <br> - - <a href="/dataissues">Data Issues</a> | - <a href="/handbook/computing/todo-data.html">tasks to do </a> | - <a id="cavesLink" href="/indxal.htm">caves</a> | - <a id="qmsLink" href="/cave/qms/1623-290">QMs</a> | - <a id="entsLink" href="/eastings">ents</a> | - <a id="folklink" href="/folk">expoers</a> | - <a id="caversLink" href="/people">survey lengths</a> | - <a href="/stats">statistics</a> | - <a href="/wallets/year/2022">Wallets(2022)</a> | - <a href="/expedition/2022">Expo(2022)</a> | - <a href="/controlpanel">Control panel</a> | - -</div> - -<div id="nav"> - - <!-- Not used any more? --> - -</div> - -<div id="content" > - - - - - <div id="related"> - - - </div> - - -<div class='middle'> - <h2>Bad Slug Error</h2> -</div> - - -<div class='middle3 login'> - <div class='space'></div> - <div class='align-center'> - <h3>There has been a Troggle error. </h3> - <h4> - A Cave, Entrance or QM has been referred to using a label (a 'slug') which does not work. - <p>This is the bad slug: - - <font color="red"> - - 1623-284 - from caveQMs() - - </font> - <p> - This is the previous page which had the bad slug reference on it: <font color="red"> -<script type="text/javascript"> - document.write(document.referrer); -</script> -</font> - </h4> - <p> -<p>It is also possible that the cave description page is being viewed using an alternative URL, -so that the local links in the page to other parts of the cave do not work. -<br> -e.g. /cave/1623-161 is not the correct way of looking at Kaninchenhohle, -<br> -you should be using <br> -/1623/161/top.htm instead. -<p>If that is the case, tell a nerd that we haven't fixed the fault that we thought we had fixed. - - <div class='space'><p> </div> - - <h3>What you should do now</h3> - <p>Please report the error by emailing the nerds at - <a href="mailto:expo-tech@lists.wookware.org">expo-tech@lists.wookware.org</a> with this information: - <ol> - <li>The bad slug text written in <font color="red">red</font> above. - <li>The previous page URL, also written in <font color="red">red</font> above - <li>Go back to this previous page <script type="text/javascript"> - document.write("<a href='",document.referrer,"'>",document.referrer,"</a>"); - </script> - and see if you can tell whether the bad slug was in HTML text which had been written manually, or whether it appeared to be a programming error. - </ol> - - - </div> -</div> -</div> - - -</div> -<div class="footer"> -</div> -</body> -</html> diff --git a/core/TESTS/test_caves.py b/core/TESTS/test_caves.py index d6e8bc7..c0a2e9c 100644 --- a/core/TESTS/test_caves.py +++ b/core/TESTS/test_caves.py @@ -189,16 +189,7 @@ class FixturePageTests(TestCase): # f.write(content) self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph + "'") - - def test_fix_cavehtml284(self): - response = self.client.get("/1623/284/284.html") - self.assertEqual(response.status_code, HTTPStatus.OK) - content = response.content.decode() - ph = r"A 25m long (22m deep) resurgence in Altausee" - phmatch = re.search(ph, content) - with open('_cave_fix_cavehtml284.html', 'w') as f: - f.write(content) - self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph + "'") +# Although the Cave object exists, it looks like we get a bad slug error when trying to get a QM page. # def test_fix_qms(self): # response = self.client.get("/cave/qms/1623-284") |