mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-22 20:12:00 -06:00
Rename gfm filter to render_markdown
This commit is contained in:
parent
0439be2870
commit
1423fd9024
@ -119,7 +119,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="panel-body rendered-markdown">
|
<div class="panel-body rendered-markdown">
|
||||||
{% if circuit.comments %}
|
{% if circuit.comments %}
|
||||||
{{ circuit.comments|gfm }}
|
{{ circuit.comments|markdown }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -88,11 +88,11 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>NOC Contact</td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Admin Contact</td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Circuits</td>
|
<td>Circuits</td>
|
||||||
@ -110,7 +110,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="panel-body rendered-markdown">
|
<div class="panel-body rendered-markdown">
|
||||||
{% if provider.comments %}
|
{% if provider.comments %}
|
||||||
{{ provider.comments|gfm }}
|
{{ provider.comments|markdown }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -325,7 +325,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="panel-body rendered-markdown">
|
<div class="panel-body rendered-markdown">
|
||||||
{% if device.comments %}
|
{% if device.comments %}
|
||||||
{{ device.comments|gfm }}
|
{{ device.comments|markdown }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -149,7 +149,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="panel-body rendered-markdown">
|
<div class="panel-body rendered-markdown">
|
||||||
{% if devicetype.comments %}
|
{% if devicetype.comments %}
|
||||||
{{ devicetype.comments|gfm }}
|
{{ devicetype.comments|markdown }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -158,7 +158,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="panel-body rendered-markdown">
|
<div class="panel-body rendered-markdown">
|
||||||
{% if powerfeed.comments %}
|
{% if powerfeed.comments %}
|
||||||
{{ powerfeed.comments|gfm }}
|
{{ powerfeed.comments|markdown }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -198,7 +198,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="panel-body rendered-markdown">
|
<div class="panel-body rendered-markdown">
|
||||||
{% if rack.comments %}
|
{% if rack.comments %}
|
||||||
{{ rack.comments|gfm }}
|
{{ rack.comments|markdown }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -206,7 +206,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="panel-body rendered-markdown">
|
<div class="panel-body rendered-markdown">
|
||||||
{% if site.comments %}
|
{% if site.comments %}
|
||||||
{{ site.comments|gfm }}
|
{{ site.comments|markdown }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>{{ forloop.counter }}</td>
|
<td>{{ forloop.counter }}</td>
|
||||||
<td>{% log_level level %}</td>
|
<td>{% log_level level %}</td>
|
||||||
<td class="rendered-markdown">{{ message|gfm }}</td>
|
<td class="rendered-markdown">{{ message|markdown }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% empty %}
|
{% empty %}
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -90,7 +90,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="panel-body rendered-markdown">
|
<div class="panel-body rendered-markdown">
|
||||||
{% if tag.comments %}
|
{% if tag.comments %}
|
||||||
{{ tag.comments|gfm }}
|
{{ tag.comments|markdown }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -87,7 +87,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="panel-body rendered-markdown">
|
<div class="panel-body rendered-markdown">
|
||||||
{% if tenant.comments %}
|
{% if tenant.comments %}
|
||||||
{{ tenant.comments|gfm }}
|
{{ tenant.comments|markdown }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -115,7 +115,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="panel-body rendered-markdown">
|
<div class="panel-body rendered-markdown">
|
||||||
{% if cluster.comments %}
|
{% if cluster.comments %}
|
||||||
{{ cluster.comments|gfm }}
|
{{ cluster.comments|markdown }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -152,7 +152,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="panel-body rendered-markdown">
|
<div class="panel-body rendered-markdown">
|
||||||
{% if virtualmachine.comments %}
|
{% if virtualmachine.comments %}
|
||||||
{{ virtualmachine.comments|gfm }}
|
{{ virtualmachine.comments|markdown }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -31,9 +31,8 @@ def placeholder(value):
|
|||||||
return mark_safe(placeholder)
|
return mark_safe(placeholder)
|
||||||
|
|
||||||
|
|
||||||
# TODO: Rename this filter as py-gfm is no longer in use
|
|
||||||
@register.filter(is_safe=True)
|
@register.filter(is_safe=True)
|
||||||
def gfm(value):
|
def render_markdown(value):
|
||||||
"""
|
"""
|
||||||
Render text as Markdown
|
Render text as Markdown
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user