|
- # 这是new_entry.html
- {% extends "learning_logs/base.html" %}
- {% block content %}
-
- <p>
- <a href="{% url 'learning_logs:topic' topic.id %}">{{ topic }}</a>
- </p>
-
- <p>Add a new entry:</p>
-
- <form action="{% url 'learning_logs:new_entry' topic.id %}" method='post'>
- {% csrf_token %}
- {{ form.as_p }}
- <font size="4"> <botton name='submit'>add entry</botton></font>
- </form>
-
- {% endblock content %}
复制代码- #这是 new_topic.html
- {% extends "learning_logs/base.html" %}
- {% block content %}
- <p>Add a new topic:</p>
-
- <form action="{% url 'learning_logs:new_topic' %}" method='post'>
- {% csrf_token %}
- {{ form.as_p }}
- <font size="4" face="Verdana"> <button name="submit">add topic</button></font>
- </form>
-
- {% endblock content %}
复制代码 如上,本来想创建一个提交按钮(位于new_entry.html),但是却变成了字符串渲染
new_topic.html作为对比,其中的按钮就创建成功了
实在是不知道为什么
求助!!!
|
|