File tree Expand file tree Collapse file tree 4 files changed +32
-15
lines changed Expand file tree Collapse file tree 4 files changed +32
-15
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,11 @@ class ApiEndpoint(object):
66 def __init__ (self , pattern , parent_pattern = None ):
77 self .pattern = pattern
88 self .callback = pattern .callback
9- self .name = pattern .name
9+ # self.name = pattern.name
1010 self .name_parent = simplify_regex (parent_pattern .regex .pattern ).replace ('/' , '' ) if parent_pattern else None
1111 self .path = self .__get_path__ (parent_pattern )
1212 self .allowed_methods = self .__get_allowed_methods__ ()
13- self .view_name = pattern .callback .__name__
13+ # self.view_name = pattern.callback.__name__
1414 self .fields = self .__get_serializer_fields__ ()
1515
1616 def __get_path__ (self , parent_pattern ):
Original file line number Diff line number Diff line change @@ -25,11 +25,23 @@ body {
2525 word-wrap : break-word ;
2626}
2727
28+ .endpoint .methods {
29+ margin-bottom : 0 ;
30+ }
31+
2832.endpoint .methods .method {
29- border : 1px solid # 2c3e50 ;
30- padding : 3px 8px ;
33+ padding : 4px 8px ;
34+ margin-top : 10.5px ;
35+ color : #FFF ;
3136}
3237
38+ .endpoint .methods .method.get { background-color : #18bc9c ; }
39+ .endpoint .methods .method.post { background-color : #f39c12 ; }
40+ .endpoint .methods .method.put { background-color : #028d94 ; }
41+ .endpoint .methods .method.patch { background-color : #028d94 ; }
42+ .endpoint .methods .method.delete { background-color : #e74c3c ; }
43+ .endpoint .methods .method.options { background-color : #3498db ; }
44+
3345/* @end Endpoint */
3446
3547
Original file line number Diff line number Diff line change 1616 <!-- Font Awesome -->
1717 < link href ="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css " rel ="stylesheet ">
1818 <!-- Custom Style -->
19- < link href ="{% static "css /style.css" %}" rel="stylesheet ">
19+ < link rel ="stylesheet/less " type ="text/css " href ="{% static "less /style.less" %}" />
20+
21+ <!-- LESS CSS -->
22+ < script src ="//cdnjs.cloudflare.com/ajax/libs/less.js/2.5.3/less.min.js "> </ script >
2023 </ head >
2124
2225 < body >
Original file line number Diff line number Diff line change @@ -10,16 +10,18 @@ <h1>{{group.grouper}}</h1>
1010
1111 {% for endpoint in group.list %}
1212 < div class ="endpoint ">
13- < h4 class ="title "> {{ endpoint.path }}</ h4 >
14-
15- < ul class ="list-inline methods ">
16- {% for method in endpoint.allowed_methods %}
17- < li class ="method "> {{ method }}</ li >
18- {% endfor %}
19- </ ul >
20-
21- < p > View Name: {{ endpoint.view_name }}</ p >
22- < p > URL Name: {{ endpoint.name }}</ p >
13+ < div class ="row ">
14+ < div class ="col-md-7 ">
15+ < h4 class ="title "> {{ endpoint.path }}</ h4 >
16+ </ div >
17+ < div class ="col-md-5 text-right ">
18+ < ul class ="list-inline methods ">
19+ {% for method in endpoint.allowed_methods %}
20+ < li class ="method {{ method|lower }} "> {{ method }}</ li >
21+ {% endfor %}
22+ </ ul >
23+ </ div >
24+ </ div >
2325
2426 {% if endpoint.fields %}
2527 < p > Fields:</ p >
You can’t perform that action at this time.
0 commit comments