summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@klebos.com>2021-03-26 21:19:31 +0000
committerPhilip Sargent <philip.sargent@klebos.com>2021-03-26 21:19:31 +0000
commitdba0fd8b2008dcb5de24aeb8348fd9a0946b8255 (patch)
treec7ba07e3e856dfba7d3c8c77514bdbd54f4726fe
parentec83c1ff122b7a1d933225335ef962b9c9b8612c (diff)
downloadtroggle-dba0fd8b2008dcb5de24aeb8348fd9a0946b8255.tar.gz
troggle-dba0fd8b2008dcb5de24aeb8348fd9a0946b8255.tar.bz2
troggle-dba0fd8b2008dcb5de24aeb8348fd9a0946b8255.zip
remove survexblock webpage - redundant
-rw-r--r--core/templatetags/survex_markup.py7
-rw-r--r--core/views_caves.py8
-rw-r--r--templates/survexblock.html49
-rw-r--r--urls.py1
4 files changed, 7 insertions, 58 deletions
diff --git a/core/templatetags/survex_markup.py b/core/templatetags/survex_markup.py
index d6ddd0e..94ba97d 100644
--- a/core/templatetags/survex_markup.py
+++ b/core/templatetags/survex_markup.py
@@ -7,6 +7,13 @@ import re
register = template.Library()
# seems to add extra lines between the commented lines, which isn't so great.
+
+# Simple use in svxfile.html produces a textarea, double-spacing and no colouring.
+# so this is going to take some work, and we are better off not using it but getting
+# syntax colouring to work with CodeMirror instead. PPhilip S. 28 March 2021.
+
+# The only template which used it, survexblock.html, has been removed as unnecessary.
+
regexes = []
regexes.append((re.compile(r"(;.*)$", re.IGNORECASE|re.MULTILINE),
r'<span class = "comment">\1</span>\n'))
diff --git a/core/views_caves.py b/core/views_caves.py
index 5820857..95de183 100644
--- a/core/views_caves.py
+++ b/core/views_caves.py
@@ -277,14 +277,6 @@ def entranceSlug(request, slug):
else:
return render(request,'entranceslug.html', {'entrance': entrance})
-def survexblock(request, survexpath):
- survexpath = re.sub("/", ".", survexpath)
- print("jjjjjj", survexpath)
- survexblock = models.SurvexBlock.objects.get(survexpath=survexpath)
- #ftext = survexblock.filecontents()
- ftext = survexblock.text
- return render(request,'survexblock.html', {'survexblock':survexblock, 'ftext':ftext, })
-
def surveyindex(request):
surveys=Survey.objects.all()
expeditions=Expedition.objects.order_by("-year")
diff --git a/templates/survexblock.html b/templates/survexblock.html
deleted file mode 100644
index b159956..0000000
--- a/templates/survexblock.html
+++ /dev/null
@@ -1,49 +0,0 @@
-{% extends "base.html" %}
-{% load wiki_markup %}
-{% load survex_markup %}
-
-
-{% block title %}Survex Block{% endblock %}
-
-{% block content %}
-<h2>Survex Block {{survexblock.survexpath}}</h2>
-
-<p>Link to <a href="{% url "svx" survexblock.survexfile.path %}">{{survexblock.survexfile.path}}</a></p>
-
-<p>Needs duplicates removed from right hand column</p>
-<p>Needs links to survex file presentation</p>
-<p>Needs to start dealing with misspellings of names (prob by editing the originals)</p>
-
-<div id="col2">
-
-{% if survexblock.parent %}
- <p>Survey block above:</p>
- <p class="indent"><a href="{% url "survexblock" survexblock.parent.survexpath %}">{{survexblock.parent.survexpath}}</a></p>
-{% endif %}
-
-{% if survexblock.survexblock_set.all %}
- <p>Survey blocks below:</p>
- {% for survexblockdown in survexblock.survexblock_set.all %}
- <p class="indent"><a href="{% url "survexblock" survexblockdown.survexpath %}">{{survexblockdown.survexpath}}</a></p>
- {% endfor %}
-{% endif %}
-
-<p>Date: {{survexblock.date}}</p>
-
-<table>
-{% for personrole in survexblock.GetPersonroles %}
-<tr>
- <td><a href="{{personrole.person.get_absolute_url}}">{{personrole.person}}</a></td>
- <td>{{personrole.roles}}</td>
-</tr>
-{% endfor %}
-</table>
-
-
-</div>
-
-<div class="survexblock">
- {{ftext|survex_to_html}}
-</div>
-
-{% endblock %}
diff --git a/urls.py b/urls.py
index 429c0c6..4968ad8 100644
--- a/urls.py
+++ b/urls.py
@@ -109,7 +109,6 @@ actualurlpatterns = [
# url(r'^map/', .........), # Intercepted by Apache. Yields OpenStreetMap. Redirects to expoweb/map
- url(r'^survexblock/(.+)$', views_caves.survexblock, name="survexblock"),
url(r'^survexfile/(?P<survex_file>.*?)\.svx$', views_survex.svx, name="svx"),
url(r'^survexfile/(?P<survex_file>.*?)\.3d$', views_survex.threed, name="threed"),
url(r'^survexfile/(?P<survex_file>.*?)\.log$', views_survex.svxraw),