restoring wiki_markup where still used

This commit is contained in:
Philip Sargent 2021-04-02 23:17:54 +01:00
parent ea221281a3
commit bd8d59b343
7 changed files with 11 additions and 28 deletions

View File

@ -7,6 +7,12 @@ from troggle.core.models_caves import LogbookEntry, QM, Cave
import re, urllib.parse import re, urllib.parse
register = template.Library() 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() @register.filter()
def plusone(n): def plusone(n):

View File

@ -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 %}

View File

@ -1,6 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load wiki_markup %}
{% block title %}{{ cave.official_name|wiki_to_html }} - {{ entrance_letter|wiki_to_html }}{% endblock %} {% block title %}{{ cave.official_name|wiki_to_html }} - {{ entrance_letter|wiki_to_html }}{% endblock %}

View File

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load wiki_markup %}
{% block title %}Logbook {{logbookentry.id}}{% endblock %} {% block title %}Logbook {{logbookentry.id}}{% endblock %}
{% block editLink %}<a href={{logbookentry.get_admin_url}}/>Edit logbook entry {{logbookentry|wiki_to_html_short}}</a>{% endblock %} {% block editLink %}<a href={{logbookentry.get_admin_url}}/>Edit logbook entry {{logbookentry|wiki_to_html_short}}</a>{% endblock %}

View File

@ -1,6 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load wiki_markup %}
{% block title %}Person {{person|wiki_to_html_short}}{% endblock %} {% 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 %} {% block editLink %}| <a href={{person.get_admin_url}}>Edit person {{person|wiki_to_html_short}}</a>{% endblock %}

View File

@ -1,6 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load wiki_markup %}
{% block title %}Person Index{% endblock %} {% block title %}Person Index{% endblock %}
{% block content %} {% block content %}

View File

@ -1,7 +1,6 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load wiki_markup %}
{% load link %} {% load link %}
{% block title %} QM: {{qm|wiki_to_html_short}} {% endblock %} {% 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 %} {% block editLink %}| <a href={{qm.get_admin_url}}>Edit QM {{qm|wiki_to_html_short}}</a>{% endblock %}