27 lines
753 B
HTML
27 lines
753 B
HTML
<!doctype html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>上传文件</title>
|
|
</head>
|
|
<body>
|
|
<h1>上传文件</h1>
|
|
<nav><a href="{% url 'documents:list' %}">返回文件列表</a></nav>
|
|
<form method="post" enctype="multipart/form-data">
|
|
{% csrf_token %}
|
|
<p>
|
|
<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>
|
|
</p>
|
|
<p>{{ form.file.label_tag }} {{ form.file }}</p>
|
|
{{ form.errors }}
|
|
<p>支持 .txt、.md、.pdf 和 .docx 文件。</p>
|
|
<button type="submit">上传</button>
|
|
</form>
|
|
</body>
|
|
</html>
|