diff --git a/rest_framework/static/rest_framework/docs/js/api.js b/rest_framework/static/rest_framework/docs/js/api.js index 3c5b7180dd..2a2c835ef9 100644 --- a/rest_framework/static/rest_framework/docs/js/api.js +++ b/rest_framework/static/rest_framework/docs/js/api.js @@ -2,6 +2,14 @@ var responseDisplay = 'data' var coreapi = window.coreapi var schema = window.schema +function normalizeKeys (arr) { + var _normarr = []; + for (var i = 0; i < arr.length; i++) { + _normarr = _normarr.concat(arr[i].split(' > ')); + } + return _normarr; +} + function normalizeHTTPHeader (str) { // Capitalize HTTP headers for display. return (str.charAt(0).toUpperCase() + str.substring(1)) @@ -94,7 +102,7 @@ $(function () { var $requestAwaiting = $form.find('.request-awaiting') var $responseRaw = $form.find('.response-raw') var $responseData = $form.find('.response-data') - var key = $form.data('key') + var key = normalizeKeys($form.data('key')) var params = {} var entries = formEntries($form.get()[0]) @@ -212,7 +220,6 @@ $(function () { } var client = new coreapi.Client(options) - client.action(schema, key, params).then(function (data) { var response = JSON.stringify(data, null, 2) $requestAwaiting.addClass('hide') diff --git a/rest_framework/templates/rest_framework/docs/document.html b/rest_framework/templates/rest_framework/docs/document.html index 274eee4e39..7a438f68d8 100644 --- a/rest_framework/templates/rest_framework/docs/document.html +++ b/rest_framework/templates/rest_framework/docs/document.html @@ -20,7 +20,7 @@
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: