24 lines
861 B
HTML
24 lines
861 B
HTML
{% extends 'layout.html' %}
|
||
{% block content %}
|
||
<div class="container">
|
||
<div class="panel panel-default">
|
||
<div class="panel-heading">
|
||
<h3 class="panel-title">{{ title }}</h3>
|
||
</div>
|
||
<div class="panel-body">
|
||
<!-- novalidate 关闭浏览器的表单验证,用Django来控制检验 -->
|
||
<form method="post" enctype="multipart/form-data" novalidate>
|
||
{% csrf_token %}
|
||
{% for field in form %}
|
||
<div class="form-group">
|
||
<label>{{ field.label }}</label>
|
||
{{ field }}<span style="color:red;"> {{ field.errors.0 }}</span>
|
||
</div>
|
||
{% endfor %}
|
||
<button type="submit" class="btn btn-primary">保存</button>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
{% endblock %}
|