First time here? Check out the FAQ!

Revision history  [back]

Check if someone have a particular badge

Hi,

I created a badge moderator and I want to check if the user have this badge to allow him to delete some posts.

For example, in the file askbot/templates/question/question_controls.html

I want to put that :

{% if <check if the logged user have the badge moderator (id = 34)> %}
<a id="post-{{question.id}}-delete" class="question-delete">
{% trans %}delete{% endtrans%}
</a>
{% endif %}