var $dialog = show_dialog(doptions);\r
} else {\r
start_command();\r
var $dialog = show_dialog(doptions);\r
} else {\r
start_command();\r
- $.getJSON(ajax_url, function(data) {\r
- process_ajax_response(data, evt);\r
+ $.ajax({\r
+ url: ajax_url,\r
+ type: "POST",\r
+ dataType: "json",\r
+ contentType: "application/json; charset=utf-8",\r
+ success: function(data) {\r
+ process_ajax_response(data, evt);\r
+ }\r
@decorate.withfn(command)
def vote_post(request, id, vote_type):
@decorate.withfn(command)
def vote_post(request, id, vote_type):
- if not request.is_ajax():
+ if not request.method == 'POST':
raise CommandException(_("Invalid request"))
raise CommandException(_("Invalid request"))