39 lines
1.5 KiB
HTML
39 lines
1.5 KiB
HTML
{% extends "base.html" %} {% block title %}添加文章{%endblock%} {% block bc %}
|
|
<li class="breadcrumb-item"><a href="/article">分类管理</a></li>
|
|
{% endblock %} {% block content %}
|
|
<form action="/article/add" method="post">
|
|
<form>
|
|
<div class="mb-3">
|
|
<label for="title" class="form-label">文章标题</label>
|
|
<input
|
|
type="text"
|
|
name="title"
|
|
class="form-control"
|
|
id="title"
|
|
placeholder="输入文章标题"
|
|
required
|
|
/>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="category_id" class="form-label">所属分类</label>
|
|
<select class="form-control" id="category_id" name="category_id" required>
|
|
<option value="">--请选择--</option>
|
|
{% for category in categies%}
|
|
<option value="{{category.id}}">{{category.name}}</option>
|
|
{%endfor%}
|
|
</select>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="content" class="form-label">文章内容</label>
|
|
<textarea
|
|
id="content"
|
|
name="content"
|
|
class="form-control"
|
|
placeholder="请输入文章内容"
|
|
required
|
|
></textarea>
|
|
</div>
|
|
<button type="submit" class="btn btn-primary">提交</button>
|
|
</form>
|
|
</form>
|
|
{%endblock%} |