diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 95a57a6f501..10ecc8fcce2 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -12,6 +12,8 @@ v2.2 API changes and deprecations: + +* The `ckan.api_url` has been completely removed and it can no longer be used * The edit() and after_update() methods of IPackageController plugins are now called when updating a resource using the web frontend or the resource_update API action [#1052] diff --git a/ckan/lib/app_globals.py b/ckan/lib/app_globals.py index 38c777f7555..38138e87815 100644 --- a/ckan/lib/app_globals.py +++ b/ckan/lib/app_globals.py @@ -44,7 +44,6 @@ 'ckan.template_footer_end': {}, 'ckan.dumps_url': {}, 'ckan.dumps_format': {}, - 'ckan.api_url': {}, 'ofs.impl': {'name': 'ofs_impl'}, 'ckan.homepage_style': {'default': '1'}, diff --git a/ckan/public/base/javascript/client.js b/ckan/public/base/javascript/client.js index 45940c0086d..e1c60ccf24e 100644 --- a/ckan/public/base/javascript/client.js +++ b/ckan/public/base/javascript/client.js @@ -370,7 +370,7 @@ }); ckan.sandbox.setup(function (instance) { - instance.client = new Client({endpoint: ckan.API_ROOT}); + instance.client = new Client({endpoint: ckan.SITE_ROOT}); }); ckan.Client = Client; diff --git a/ckan/public/base/javascript/main.js b/ckan/public/base/javascript/main.js index 42c76dfd15f..c5f36ef7176 100644 --- a/ckan/public/base/javascript/main.js +++ b/ckan/public/base/javascript/main.js @@ -29,7 +29,6 @@ this.ckan = this.ckan || {}; ckan.SITE_ROOT = getRootFromData('siteRoot'); ckan.LOCALE_ROOT = getRootFromData('localeRoot'); - ckan.API_ROOT = getRootFromData('apiRoot'); // Load the localisations before instantiating the modules. ckan.sandbox().client.getLocaleData(locale).done(function (data) { diff --git a/ckan/templates/base.html b/ckan/templates/base.html index 6012bf65928..b6290af0ad0 100644 --- a/ckan/templates/base.html +++ b/ckan/templates/base.html @@ -85,7 +85,7 @@ {# Allows custom attributes to be added to the tag #} - + {# The page block allows you to add content to the page. Most of the time it is diff --git a/doc/configuration.rst b/doc/configuration.rst index f3c7c4ea1cc..ec113ea9d4a 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -130,24 +130,6 @@ site use this setting. This setting should not have a trailing / on the end. -.. _ckan.api_url: - -ckan.api_url -^^^^^^^^^^^^ - -.. deprecated:: 2 - No longer used. - -Example:: - - ckan.api_url = http://scotdata.ckan.net/api - -Default value: ``/api`` - -The URL that resolves to the CKAN API part of the site. This is useful if the -API is hosted on a different domain, for example when a third-party site uses -the forms API. - .. _apikey_header_name: apikey_header_name diff --git a/doc/legacy-api.rst b/doc/legacy-api.rst index b10841fc976..7ab990dc371 100644 --- a/doc/legacy-api.rst +++ b/doc/legacy-api.rst @@ -434,12 +434,6 @@ front-end javascript. All Util APIs are read-only. The response format is JSON. Javascript calls may want to use the JSONP formatting. -.. Note:: - - Some CKAN deployments have the API deployed at a different domain to the main CKAN website. To make sure that the AJAX calls in the Web UI work, you'll need to configue the ckan.api_url. e.g.:: - - ckan.api_url = http://api.example.com/ - dataset autocomplete ````````````````````