| 12345678910111213141516171819202122232425262728293031323334353637 |
- {% extends "base.html" %}
- {% load static %}
- {% block title %}
- 发表文章
- {% endblock title %}
- {% block content %}
- <div class="container">
- <div class="row">
- <div class="col-12">
- <br>
- <!-- 提交文章的表单 -->
- <form method="post" action=".">
- <!-- Django中需要POST数据的地方都必须有csrf_token -->
- {% csrf_token %}
- <div class="form-group">
- <label for="title">
- 文章标题
- </label>
- <input type="text" class="form-control" id="title" name="title">
- </div>
- <div class="form-group">
- <label for="body">
- 文章正文
- </label>
- <textarea type="text" class="form-control" id="body" name="body" rows="12">
- </textarea>
- </div>
- <button type="submit" class="btn btn-primary">
- 完成
- </button>
- </form>
- </div>
- </div>
- </div>
- {% endblock content %}
|