Skip to content

Commit

Permalink
[#960] Remove ckan.api_url completely on 2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Nov 5, 2013
1 parent 38ed0ae commit 04d6578
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 29 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Expand Up @@ -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]
Expand Down
1 change: 0 additions & 1 deletion ckan/lib/app_globals.py
Expand Up @@ -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'},

Expand Down
3 changes: 0 additions & 3 deletions ckan/public/base/javascript/main.js
Expand Up @@ -30,9 +30,6 @@ this.ckan = this.ckan || {};
ckan.SITE_ROOT = getRootFromData('siteRoot');
ckan.LOCALE_ROOT = getRootFromData('localeRoot');

// Not used, kept for backwards compatibility
ckan.API_ROOT = body.data('apiRoot') || ckan.SITE_ROOT;

// Load the localisations before instantiating the modules.
ckan.sandbox().client.getLocaleData(locale).done(function (data) {
ckan.i18n.load(data);
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/base.html
Expand Up @@ -85,7 +85,7 @@
</head>

{# Allows custom attributes to be added to the <body> tag #}
<body{% block bodytag %} data-site-root="{{ h.url('/', locale='default', qualified=true) }}" data-locale-root="{{ h.url('/', qualified=true) }}" data-api-root="{{ g.api_url }}"{% endblock %}>
<body{% block bodytag %} data-site-root="{{ h.url('/', locale='default', qualified=true) }}" data-locale-root="{{ h.url('/', qualified=true) }}" {% endblock %}>

{#
The page block allows you to add content to the page. Most of the time it is
Expand Down
18 changes: 0 additions & 18 deletions doc/configuration.rst
Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions doc/legacy-api.rst
Expand Up @@ -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
````````````````````
Expand Down

0 comments on commit 04d6578

Please sign in to comment.