annotate gpp/templates/forums/spammer.html @ 552:9e42e6618168

For bitbucket issue #2, tweak the admin settings for the Post model to reduce slow queries. Define our own queryset() method so we can control the select_related(), and not have it cascade from post to topics to forums to categories. Removed 'topic' from list_display because MySQL still sucked with 2 inner joins. Now it seems to be tolerable with only one join to User.
author Brian Neal <bgneal@gmail.com>
date Wed, 25 Jan 2012 20:07:03 -0600
parents 3c48a555298d
children
rev   line source
bgneal@212 1 {% extends 'base.html' %}
bgneal@310 2 {% load url from future %}
bgneal@492 3 {% load bio_tags %}
bgneal@212 4 {% block title %}Deactivate Spammer: {{ post.user.username }}{% endblock %}
bgneal@212 5 {% block content %}
bgneal@212 6 <h2>Deactivate Spammer: {{ post.user.username }}</h2>
bgneal@212 7
bgneal@215 8 {% if can_moderate and can_deactivate %}
bgneal@212 9 <p>Please confirm that you wish to mark the user
bgneal@492 10 {% profile_link post.user.username %} as a
bgneal@310 11 spammer based on <a href="{% url 'forums-goto_post' post.id %}">this post</a>.
bgneal@212 12 If you confirm, the user's account will be deactivated, and all posts and comments
bgneal@212 13 left by the user will be deleted.</p>
bgneal@212 14 <p><strong>This is a drastic action, so please be absolutely sure
bgneal@212 15 you wish to proceed!</strong></p>
bgneal@212 16 <form action="." method="post">{% csrf_token %}
bgneal@212 17 <input type="submit" value="Deactivate {{ post.user.username }}" />
bgneal@212 18 </form>
bgneal@212 19 {% else %}
bgneal@215 20 {% if can_moderate %}
bgneal@215 21 <p>That user is no longer a stranger, and can't be deactivated like this. Please
bgneal@215 22 contact the site admin if that user is now posting spam.</p>
bgneal@215 23 {% else %}
bgneal@215 24 <p>Sorry, but you don't have permission to deactivate spammers in that post's forum.</p>
bgneal@215 25 {% endif %}
bgneal@212 26 {% endif %}
bgneal@212 27 <hr />
bgneal@212 28 <p>
bgneal@310 29 <a href="{% url 'forums-goto_post' post.id %}">Return to the post</a>.
bgneal@212 30 </p>
bgneal@212 31 {% endblock %}