新增:打包编译功能
This commit is contained in:
10
backend/templates/rest_framework/admin/detail.html
Normal file
10
backend/templates/rest_framework/admin/detail.html
Normal file
@@ -0,0 +1,10 @@
|
||||
{% load rest_framework %}
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
{% for key, value in results|items %}
|
||||
{% if key in details %}
|
||||
<tr><th>{{ key|capfirst }}</th><td {{ value|add_nested_class }}>{{ value|format_value }}</td></tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
11
backend/templates/rest_framework/admin/dict_value.html
Normal file
11
backend/templates/rest_framework/admin/dict_value.html
Normal file
@@ -0,0 +1,11 @@
|
||||
{% load rest_framework %}
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
{% for k, v in value|items %}
|
||||
<tr>
|
||||
<th>{{ k|format_value }}</th>
|
||||
<td>{{ v|format_value }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
26
backend/templates/rest_framework/admin/list.html
Normal file
26
backend/templates/rest_framework/admin/list.html
Normal file
@@ -0,0 +1,26 @@
|
||||
{% load rest_framework %}
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>{% for column in columns%}<th>{{ column|capfirst }}</th>{% endfor %}<th class="col-xs-1"></th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in results %}
|
||||
<tr>
|
||||
{% for key, value in row|items %}
|
||||
{% if key in columns %}
|
||||
<td {{ value|add_nested_class }} >
|
||||
{{ value|format_value }}
|
||||
</td>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<td>
|
||||
{% if row.url %}
|
||||
<a href="{{ row.url }}"><span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span></a>
|
||||
{% else %}
|
||||
<span class="glyphicon glyphicon-chevron-right text-muted" aria-hidden="true"></span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
11
backend/templates/rest_framework/admin/list_value.html
Normal file
11
backend/templates/rest_framework/admin/list_value.html
Normal file
@@ -0,0 +1,11 @@
|
||||
{% load rest_framework %}
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
{% for item in value %}
|
||||
<tr>
|
||||
<th>{{ forloop.counter0 }}</th>
|
||||
<td>{{ item|format_value }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -0,0 +1,2 @@
|
||||
{% load rest_framework %}
|
||||
{% for item in value %}{% if not forloop.first%},{% endif %} {{item|format_value}}{% endfor %}
|
||||
Reference in New Issue
Block a user