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

Merge pull request #9547 from kkthxbye-code/fix-9533

Fixes #9533 - Move markdown documentation to docs
This commit is contained in:
Jeremy Stretch
2022-06-17 13:14:44 -04:00
committed by GitHub
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
"""