diff options
author | Philip Sargent <philip.sargent@klebos.com> | 2021-04-02 23:17:54 +0100 |
---|---|---|
committer | Philip Sargent <philip.sargent@klebos.com> | 2021-04-02 23:17:54 +0100 |
commit | bd8d59b343767261e6025048b78d90ff2a9288a5 (patch) | |
tree | 4fbebee3f659fc5f88776f3770cbd07494d25b48 | |
parent | ea221281a3ceae655643d5472d6e6357e1381d4c (diff) | |
download | troggle-bd8d59b343767261e6025048b78d90ff2a9288a5.tar.gz troggle-bd8d59b343767261e6025048b78d90ff2a9288a5.tar.bz2 troggle-bd8d59b343767261e6025048b78d90ff2a9288a5.zip |
restoring wiki_markup where still used
-rw-r--r-- | core/templatetags/wiki_markup.py | 6 | ||||
-rw-r--r-- | templates/cave_description.html | 19 | ||||
-rw-r--r-- | templates/entrance.html | 3 | ||||
-rw-r--r-- | templates/logbookentry.html | 2 | ||||
-rw-r--r-- | templates/person.html | 3 | ||||
-rw-r--r-- | templates/personindex.html | 3 | ||||
-rw-r--r-- | templates/qm.html | 3 |
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 %} |