use*_*624 2 html python django django-templates
<!--this is my base.html file -->
<!DOCTYPE html>
<html lang="en">
<head>
<title>Jumbotron Template for Bootstrap</title>
</head>
<body>
{% block content %} {% endblock %}
<p>© Company 2014</p>
</body>
</html>
<!-- this is my signup.html file-->
{% extends "base.html" %}
{% block title %}
<form method = 'POST' action = ''>{% csrf_token %}
<label for="your_name">Your name: </label>
{{form.as_p}}
<input type = 'submit'>
</form>
{ % endblock % }
Run Code Online (Sandbox Code Playgroud)
我只是收到错误
“未闭合的标签‘block’。寻找以下之一:endblock”
请帮忙。
ale*_*cxe 11
重要的是不要添加额外的空格并遵循语法。代替:
{ % endblock % }
Run Code Online (Sandbox Code Playgroud)
和:
{% endblock %}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5919 次 |
| 最近记录: |