]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/views/commands.py
do not show user bio if user is suspended
[osqa.git] / forum / views / commands.py
index 2f35c1ecc82abc7f866ebf3287526f3f41e9eddd..5271eec69d014aaf0591120096aa40ab67a29a1f 100644 (file)
@@ -75,6 +75,10 @@ class CannotDoubleActionException(CommandException):
 
 @decorate.withfn(command)
 def vote_post(request, id, vote_type):
+    if not request.method == 'POST':
+        raise CommandException(_("Invalid request"))
+
+
     post = get_object_or_404(Node, id=id).leaf
     user = request.user
 
@@ -613,7 +617,11 @@ def award_points(request, user_id, answer_id):
         raise AnonymousNotAllowedException(_('award'))
 
     if not request.POST:
-        return render_to_response("node/award_points.html", { 'user' : user, 'awarded_user' : awarded_user, })
+        return render_to_response("node/award_points.html", {
+            'user' : user,
+            'awarded_user' : awarded_user,
+            'reputation_to_comment' : str(settings.REP_TO_COMMENT)
+        })
     else:
         points = int(request.POST['points'])