Django密码签名

时间:2014-10-09 10:18:45

标签: python django

我有这个:

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 SigningID篇文章,以便用户无法篡改它们并向错误的文章提交评论。我该如何有效地做到这一点?

0 个答案:

没有答案