Models.py
class Question(models.Model):
name = models.CharField(max_length=300, unique=True)
desc = HTMLField()
img = models.CharField(max_length=100)
topic = models.ForeignKey(Topic, related_name='question')
created_by = models.ForeignKey(User, related_name='question')
created_on = models.DateTimeField(auto_now_add=True)
def __str__(self):
return self.name
模板
<form method="post">
{% csrf_token %}
{%include 'includes/form.html' %}
<input type="submit" class="btn btn-success" value="Post Answer" />
</form>
我正在使用TinyMCE来实现丰富的textarea目的。在这里,我添加了字段&#34; desc&#34;作为HTMLField并成功应用了迁移。我能够在管理页面中看到desc但在我的模板中没有。请指出我的错误?