Rename gfm filter to render_markdown

This commit is contained in:
Jeremy Stretch 2020-03-09 10:31:29 -04:00
parent 0439be2870
commit 1423fd9024
13 changed files with 15 additions and 16 deletions

View File

@ -119,7 +119,7 @@
</div>
<div class="panel-body rendered-markdown">
{% if circuit.comments %}
{{ circuit.comments|gfm }}
{{ circuit.comments|markdown }}
{% else %}
<span class="text-muted">None</span>
{% endif %}

View File

@ -88,11 +88,11 @@
</tr>
<tr>
<td>NOC Contact</td>
<td class="rendered-markdown">{{ provider.noc_contact|gfm|placeholder }}</td>
<td class="rendered-markdown">{{ provider.noc_contact|markdown|placeholder }}</td>
</tr>
<tr>
<td>Admin Contact</td>
<td class="rendered-markdown">{{ provider.admin_contact|gfm|placeholder }}</td>
<td class="rendered-markdown">{{ provider.admin_contact|markdown|placeholder }}</td>
</tr>
<tr>
<td>Circuits</td>
@ -110,7 +110,7 @@
</div>
<div class="panel-body rendered-markdown">
{% if provider.comments %}
{{ provider.comments|gfm }}
{{ provider.comments|markdown }}
{% else %}
<span class="text-muted">None</span>
{% endif %}

View File

@ -325,7 +325,7 @@
</div>
<div class="panel-body rendered-markdown">
{% if device.comments %}
{{ device.comments|gfm }}
{{ device.comments|markdown }}
{% else %}
<span class="text-muted">None</span>
{% endif %}

View File

@ -149,7 +149,7 @@
</div>
<div class="panel-body rendered-markdown">
{% if devicetype.comments %}
{{ devicetype.comments|gfm }}
{{ devicetype.comments|markdown }}
{% else %}
<span class="text-muted">None</span>
{% endif %}

View File

@ -158,7 +158,7 @@
</div>
<div class="panel-body rendered-markdown">
{% if powerfeed.comments %}
{{ powerfeed.comments|gfm }}
{{ powerfeed.comments|markdown }}
{% else %}
<span class="text-muted">None</span>
{% endif %}

View File

@ -198,7 +198,7 @@
</div>
<div class="panel-body rendered-markdown">
{% if rack.comments %}
{{ rack.comments|gfm }}
{{ rack.comments|markdown }}
{% else %}
<span class="text-muted">None</span>
{% endif %}

View File

@ -206,7 +206,7 @@
</div>
<div class="panel-body rendered-markdown">
{% if site.comments %}
{{ site.comments|gfm }}
{{ site.comments|markdown }}
{% else %}
<span class="text-muted">None</span>
{% endif %}

View File

@ -47,7 +47,7 @@
<tr>
<td>{{ forloop.counter }}</td>
<td>{% log_level level %}</td>
<td class="rendered-markdown">{{ message|gfm }}</td>
<td class="rendered-markdown">{{ message|markdown }}</td>
</tr>
{% empty %}
<tr>

View File

@ -90,7 +90,7 @@
</div>
<div class="panel-body rendered-markdown">
{% if tag.comments %}
{{ tag.comments|gfm }}
{{ tag.comments|markdown }}
{% else %}
<span class="text-muted">None</span>
{% endif %}

View File

@ -87,7 +87,7 @@
</div>
<div class="panel-body rendered-markdown">
{% if tenant.comments %}
{{ tenant.comments|gfm }}
{{ tenant.comments|markdown }}
{% else %}
<span class="text-muted">None</span>
{% endif %}

View File

@ -115,7 +115,7 @@
</div>
<div class="panel-body rendered-markdown">
{% if cluster.comments %}
{{ cluster.comments|gfm }}
{{ cluster.comments|markdown }}
{% else %}
<span class="text-muted">None</span>
{% endif %}

View File

@ -152,7 +152,7 @@
</div>
<div class="panel-body rendered-markdown">
{% if virtualmachine.comments %}
{{ virtualmachine.comments|gfm }}
{{ virtualmachine.comments|markdown }}
{% else %}
<span class="text-muted">None</span>
{% endif %}

View File

@ -31,9 +31,8 @@ def placeholder(value):
return mark_safe(placeholder)
# TODO: Rename this filter as py-gfm is no longer in use
@register.filter(is_safe=True)
def gfm(value):
def render_markdown(value):
"""
Render text as Markdown
"""