Beispiel #1
0
def move_down_category_view(request, category_id):
    if not move_category(category_id, "down"):
        return HttpResponseBadRequest("Category is already on the bottom")
    return redirect("forum", contest_id=request.contest.id)
Beispiel #2
0
def move_up_category_view(request, category_id):
    if not move_category(category_id, "up"):
        return HttpResponseBadRequest("Category is already on the top")
    return redirect('forum', contest_id=request.contest.id)