feat(documents): 增强上传反馈与状态展示
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
<td>{{ document.scenario_id }}</td>
|
||||
<td>{{ document.file_type }}</td>
|
||||
<td>{{ document.size }}</td>
|
||||
<td>{{ document.status }}</td>
|
||||
<td>{{ document.get_status_display_text }}</td>
|
||||
<td>
|
||||
{% if document.status != "indexed" %}
|
||||
<form action="{% url 'documents:index' document.id %}" method="post">
|
||||
@@ -42,6 +42,7 @@
|
||||
{% if document.error_message %}
|
||||
<pre class="code-block" style="margin-top: 10px;">{{ document.error_message }}</pre>
|
||||
{% endif %}
|
||||
<p class="muted" style="margin-top: 10px;">上传时间:{{ document.created_at|date:"Y-m-d H:i" }}</p>
|
||||
</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
|
||||
@@ -13,12 +13,11 @@
|
||||
<form method="post" enctype="multipart/form-data" class="stack">
|
||||
{% csrf_token %}
|
||||
<div>
|
||||
<label for="id_scenario_id">关联场景</label>
|
||||
<select name="scenario_id" id="id_scenario_id">
|
||||
{% for scenario in scenarios %}
|
||||
<option value="{{ scenario.id }}">{{ scenario.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{{ form.scenario_id.label_tag }}
|
||||
{{ form.scenario_id }}
|
||||
{% if form.scenario_id.errors %}
|
||||
<p class="notice notice-error">{{ form.scenario_id.errors|join:" " }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div>
|
||||
{{ form.file.label_tag }}
|
||||
|
||||
Reference in New Issue
Block a user