]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/views/users.py
Shows user diamonds in some missing spots, and adds some improvements to module decor...
[osqa.git] / forum / views / users.py
index dee69cd839a458fe37d9c86f7e61177b230fcebf..dd31abb7fadf569f936abdc2fc73dbb78199edf2 100644 (file)
@@ -16,6 +16,7 @@ from django.utils import simplejson
 from django.core.urlresolvers import reverse, NoReverseMatch\r
 from forum.forms import *\r
 from forum.utils.html import sanitize_html\r
 from django.core.urlresolvers import reverse, NoReverseMatch\r
 from forum.forms import *\r
 from forum.utils.html import sanitize_html\r
+from forum.modules import decorate\r
 from datetime import datetime, date\r
 import decorators\r
 from forum.actions import EditProfileAction, FavoriteAction, BonusRepAction, SuspendAction\r
 from datetime import datetime, date\r
 import decorators\r
 from forum.actions import EditProfileAction, FavoriteAction, BonusRepAction, SuspendAction\r
@@ -133,7 +134,7 @@ def user_powers(request, id, action, status):
     return HttpResponseRedirect(user.get_profile_url())\r
 \r
 \r
     return HttpResponseRedirect(user.get_profile_url())\r
 \r
 \r
-@decorators.command\r
+@decorate.withfn(decorators.command)\r
 def award_points(request, id):\r
     if (not request.POST) and request.POST.get('points', None):\r
         raise decorators.CommandException(_("Invalid request type"))\r
 def award_points(request, id):\r
     if (not request.POST) and request.POST.get('points', None):\r
         raise decorators.CommandException(_("Invalid request type"))\r
@@ -151,7 +152,7 @@ def award_points(request, id):
     return dict(reputation=user.reputation)\r
 \r
 \r
     return dict(reputation=user.reputation)\r
 \r
 \r
-@decorators.command\r
+@decorate.withfn(decorators.command)\r
 def suspend(request, id):\r
     user = get_object_or_404(User, id=id)\r
 \r
 def suspend(request, id):\r
     user = get_object_or_404(User, id=id)\r
 \r