1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Move markdown documentation to docs

This commit is contained in:
kkthxbye-code
2022-06-16 22:26:37 +02:00
parent c81c3d11ed
commit cf76d5c46a
3 changed files with 357 additions and 3 deletions

View File

@@ -3,6 +3,7 @@ import json
from django import forms
from django.db.models import Count
from django.forms.fields import JSONField as _JSONField, InvalidJSONInput
from django.templatetags.static import static
from netaddr import AddrFormatError, EUI
from utilities.forms import widgets
@@ -26,10 +27,9 @@ class CommentField(forms.CharField):
A textarea with support for Markdown rendering. Exists mostly just to add a standard `help_text`.
"""
widget = forms.Textarea
# TODO: Port Markdown cheat sheet to internal documentation
help_text = """
help_text = f"""
<i class="mdi mdi-information-outline"></i>
<a href="https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet" target="_blank" tabindex="-1">
<a href="{static('docs/reference/markdown/')}" target="_blank" tabindex="-1">
Markdown</a> syntax is supported
"""