summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/templatetags/wiki_markup.py6
-rw-r--r--templates/cave_description.html19
-rw-r--r--templates/entrance.html3
-rw-r--r--templates/logbookentry.html2
-rw-r--r--templates/person.html3
-rw-r--r--templates/personindex.html3
-rw-r--r--templates/qm.html3
7 files changed, 11 insertions, 28 deletions
diff --git a/core/templatetags/wiki_markup.py b/core/templatetags/wiki_markup.py
index 9aafb39..fff2836 100644
--- a/core/templatetags/wiki_markup.py
+++ b/core/templatetags/wiki_markup.py
@@ -7,6 +7,12 @@ from troggle.core.models_caves import LogbookEntry, QM, Cave
import re, urllib.parse
register = template.Library()
+'''Several templates are still (2021) using these wiki filters extensively to process data extracted from the database,
+and to restructure values into valid URLs to go elsewhere in the system, even where these are not actually 'wiki'. See
+the regexes at the end of this file.
+So the data in the database needs to be checked that there is no wiki-format content before these are deleted, and the
+filter functions of these regexes needs to be explored in practice.
+'''
@register.filter()
def plusone(n):
diff --git a/templates/cave_description.html b/templates/cave_description.html
deleted file mode 100644
index 663096b..0000000
--- a/templates/cave_description.html
+++ /dev/null
@@ -1,19 +0,0 @@
-{% extends "cavebase.html" %}
-
-{% block title %} {{cave_description}} {% endblock title %}
-{% block editLink %}<a href={{cave_description.get_admin_url}}>Edit description {{cave_description}}</a>{% endblock %}
-
-{% block contentheader %}
- {{cave_description.long_name}}
-{% endblock contentheader %}
-
-
-
-{% block content %}
-
-<h1>{{cave_description.long_name}}</h1>
-<p>
- {{cave_description.description|wiki_to_html}}
-</p>
-
-{% endblock content %} \ No newline at end of file
diff --git a/templates/entrance.html b/templates/entrance.html
index b148837..a59410c 100644
--- a/templates/entrance.html
+++ b/templates/entrance.html
@@ -1,6 +1,5 @@
{% extends "base.html" %}
-
-
+{% load wiki_markup %}
{% block title %}{{ cave.official_name|wiki_to_html }} - {{ entrance_letter|wiki_to_html }}{% endblock %}
diff --git a/templates/logbookentry.html b/templates/logbookentry.html
index c8ed439..5691c4e 100644
--- a/templates/logbookentry.html
+++ b/templates/logbookentry.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
+{% load wiki_markup %}
{% block title %}Logbook {{logbookentry.id}}{% endblock %}
{% block editLink %}<a href={{logbookentry.get_admin_url}}/>Edit logbook entry {{logbookentry|wiki_to_html_short}}</a>{% endblock %}
diff --git a/templates/person.html b/templates/person.html
index 573c194..64896a7 100644
--- a/templates/person.html
+++ b/templates/person.html
@@ -1,6 +1,5 @@
{% extends "base.html" %}
-
-
+{% load wiki_markup %}
{% block title %}Person {{person|wiki_to_html_short}}{% endblock %}
{% block editLink %}| <a href={{person.get_admin_url}}>Edit person {{person|wiki_to_html_short}}</a>{% endblock %}
diff --git a/templates/personindex.html b/templates/personindex.html
index 0a0405b..10ac7f6 100644
--- a/templates/personindex.html
+++ b/templates/personindex.html
@@ -1,6 +1,5 @@
{% extends "base.html" %}
-
-
+{% load wiki_markup %}
{% block title %}Person Index{% endblock %}
{% block content %}
diff --git a/templates/qm.html b/templates/qm.html
index 502c0a3..86ec2b5 100644
--- a/templates/qm.html
+++ b/templates/qm.html
@@ -1,7 +1,6 @@
{% extends "base.html" %}
-
+{% load wiki_markup %}
{% load link %}
-
{% block title %} QM: {{qm|wiki_to_html_short}} {% endblock %}
{% block editLink %}| <a href={{qm.get_admin_url}}>Edit QM {{qm|wiki_to_html_short}}</a>{% endblock %}