mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-22 12:06:53 -06:00
Rename gfm filter to render_markdown
This commit is contained in:
parent
0439be2870
commit
1423fd9024
@ -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 %}
|
||||
|
@ -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 %}
|
||||
|
@ -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 %}
|
||||
|
@ -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 %}
|
||||
|
@ -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 %}
|
||||
|
@ -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 %}
|
||||
|
@ -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 %}
|
||||
|
@ -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>
|
||||
|
@ -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 %}
|
||||
|
@ -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 %}
|
||||
|
@ -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 %}
|
||||
|
@ -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 %}
|
||||
|
@ -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
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user