Skip to content

Commit

Permalink
get c from toolkit instead of ckan.lib.base in plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
domoritz committed Nov 25, 2012
1 parent 1c028a1 commit 793c260
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ckanext/jsonpreview/plugin.py
@@ -1,7 +1,6 @@
from logging import getLogger

import ckan.plugins as p
import ckan.lib.base as base

log = getLogger(__name__)

Expand Down Expand Up @@ -54,7 +53,7 @@ def setup_template_variables(self, context, data_dict):
resource = data_dict['resource']
format_lower = resource['format'].lower()
if format_lower in self.JSON_FORMATS and self.proxy_is_enabled and not resource['on_same_domain']:
base.c.resource['url'] = proxy.get_proxified_resource_url(data_dict)
p.toolkit.c.resource['url'] = proxy.get_proxified_resource_url(data_dict)

def preview_template(self, context, data_dict):
return 'json.html'

0 comments on commit 793c260

Please sign in to comment.