我有这个:
views.py :
articles = Articles.objects.all()
和
的index.html :
{% for article in articles %}
<div class = 'Article'>
<h3 class='article-header'>{{article.header}}</h3>
<p class='article-body'>{{article.content}}</p>
</div>
<div class = 'comment_wrapper'>
<textarea class="comment" rows = '2' ></textarea>
<input type='hidden' value = '{{article.id}}' class='article-id'>
<div class = 'comment_buttons'>
<button class="submit_comment btn" type="submit">Comment</button>
</div>
</div>
{% endfor %}
我正在尝试Sign
使用Django Cryptographic Signing的ID
篇文章,以便用户无法篡改它们并向错误的文章提交评论。我该如何有效地做到这一点?