This commit is contained in:
2024-04-22 21:34:49 +08:00
parent 27ee16bf3a
commit 35966f9914
19 changed files with 1517 additions and 31 deletions
+24 -12
View File
@@ -583,6 +583,12 @@
任务发布页面
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/post_kecheng/">
<span data-feather="star"></span>
课程发布页面
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="trash-2"></span>
@@ -594,22 +600,28 @@
</nav>
<!-- 左侧菜单 end-->
<main class="col-md-10 ml-sm-auto col-lg-10 px-md-4">
{% if form.errors %}
<p>请修正表中的错误.</p>
{% endif %}
{# {% if form.errors %}#}
{# <p>请修正表中的错误.</p>#}
{# {% endif %}#}
<form method="post">
<form method="post" action="{% url 'post_task' %}">
<span>
任务标题:<input type="text" name="title">
</span>
<span>
任务计划描述:<input type="text" style="height:51px;width:449px" name="description">
</span>
<span>
任务截至时间:<input type="datetime-local" class="form-control" placeholder="任务截至时间" name="deadline">
</span>
{% csrf_token %}
{{ form.as_p }}
<button type="submit">发布任务</button>
</form>
<h2>任务列表</h2>
<ul>
{% for task in tasks %}
<li>{{ task.title }} - {{ task.deadline }}</li>
{% endfor %}
</ul>
{# <ul>#}
{# {% for task in tasks %}#}
{# <li>{{ task.title }} - {{ task.deadline }}</li>#}
{# {% endfor %}#}
{# </ul>#}
</main>
<!-- 右侧内容 start-->