File tree 3 files changed +14
-1
lines changed
templates/rest_framework_docs
3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 1
1
{% extends "rest_framework_docs/docs.html" %}
2
+ {% load drfdocs_filters %}
2
3
3
4
{% block apps_menu %}
4
5
{% regroup endpoints by name_parent as endpoints_grouped %}
@@ -56,7 +57,7 @@ <h4 class="panel-title title">
56
57
< div id ="{{ endpoint.path|slugify }} " class ="panel-collapse collapse " role ="tabpanel ">
57
58
< div class ="panel-body ">
58
59
{% if endpoint.docstring %}
59
- < p class ="lead "> {{ endpoint.docstring }}</ p >
60
+ < p class ="lead "> {{ endpoint.docstring|markdown }}</ p >
60
61
{% endif %}
61
62
62
63
{% if endpoint.errors %}
Original file line number Diff line number Diff line change
1
+ from django import template
2
+ from django .template .defaultfilters import stringfilter
3
+ from rest_framework .utils .formatting import markup_description
4
+
5
+
6
+ register = template .Library ()
7
+
8
+
9
+ @register .filter (name = 'markdown' )
10
+ @stringfilter
11
+ def markdown (value ):
12
+ return markup_description (value )
You can’t perform that action at this time.
0 commit comments