]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/views/users.py
OSQA-809, Include question summaries in question and answers views, wrap that in...
[osqa.git] / forum / views / users.py
index 9f039f790507516d0ddea0a7fe8119c29e995447..df38159d9482907e0bad9c80e2a7d8889ba2fe7f 100644 (file)
@@ -131,7 +131,7 @@ def online_users(request):
     })\r
 \r
 \r
-def edit_user(request, id):\r
+def edit_user(request, id, slug):\r
     user = get_object_or_404(User, id=id)\r
     if not (request.user.is_superuser or request.user == user):\r
         return HttpResponseUnauthorized(request)\r
@@ -236,7 +236,7 @@ def suspend(request, id):
             return render_to_response('users/suspend_user.html')\r
 \r
     data = {\r
-        'bantype': request.POST.get('bantype', 'indefinetly').strip(),\r
+        'bantype': request.POST.get('bantype', 'Indefinitely').strip(),\r
         'publicmsg': request.POST.get('publicmsg', _('Bad behaviour')),\r
         'privatemsg': request.POST.get('privatemsg', None) or request.POST.get('publicmsg', ''),\r
         'suspended': user\r
@@ -371,7 +371,7 @@ def user_reputation(request, user, **kwargs):
     redux = lambda x, y: x+y\r
 \r
     graph_data = simplejson.dumps([\r
-    (time.mktime(rep[i].date.timetuple()) * 1000, reduce(redux, values[:i], 0))\r
+    (time.mktime(rep[i].date.timetuple()) * 1000, reduce(redux, values[:i+1], 0))\r
     for i in range(len(values))\r
     ])\r
 \r