File tree Expand file tree Collapse file tree 1 file changed +25
-21
lines changed
drfdocs/templates/drfdocs Expand file tree Collapse file tree 1 file changed +25
-21
lines changed Original file line number Diff line number Diff line change 2
2
3
3
{% block content %}
4
4
5
- < h2 > API Endpoints</ h2 >
5
+ < h1 > API Endpoints</ h1 >
6
+ {% regroup endpoints by name_parent as endpoints_grouped %}
6
7
7
- {% for endpoint in endpoints %}
8
- {{endpoint.name_parent}}
8
+ {% for group in endpoints_grouped %}
9
+ < h1 > {{group.grouper}} </ h1 >
9
10
10
- < div class ="endpoint ">
11
- < h4 class ="title "> {{ endpoint.path }}</ h4 >
11
+ {% for endpoint in group.list %}
12
+ < div class ="endpoint ">
13
+ < h4 class ="title "> {{ endpoint.path }}</ h4 >
12
14
13
- < ul class ="list-inline methods ">
14
- {% for method in endpoint.allowed_methods %}
15
- < li class ="method "> {{ method }}</ li >
16
- {% endfor %}
17
- </ ul >
15
+ < ul class ="list-inline methods ">
16
+ {% for method in endpoint.allowed_methods %}
17
+ < li class ="method "> {{ method }}</ li >
18
+ {% endfor %}
19
+ </ ul >
18
20
19
- < p > View Name: {{ endpoint.view_name }}</ p >
20
- < p > URL Name: {{ endpoint.name }}</ p >
21
+ < p > View Name: {{ endpoint.view_name }}</ p >
22
+ < p > URL Name: {{ endpoint.name }}</ p >
21
23
22
- {% if endpoint.fields %}
23
- < p > Fields:</ p >
24
- < ul class ="list fields ">
25
- {% for field in endpoint.fields %}
26
- < li class ="field "> {{ field.name }}: {{ field.type }}</ li >
27
- {% endfor %}
28
- </ ul >
29
- {% endif %}
24
+ {% if endpoint.fields %}
25
+ < p > Fields:</ p >
26
+ < ul class ="list fields ">
27
+ {% for field in endpoint.fields %}
28
+ < li class ="field "> {{ field.name }}: {{ field.type }}</ li >
29
+ {% endfor %}
30
+ </ ul >
31
+ {% endif %}
32
+
33
+ </ div >
34
+ {% endfor %}
30
35
31
- </ div >
32
36
{% endfor %}
33
37
34
38
{% endblock %}
You can’t perform that action at this time.
0 commit comments