Permalink
Browse files

url_for does fully qualified does not work when in a language fall ba…

…ck to site_url
  • Loading branch information...
1 parent 31177b1 commit fb542fda25f3ef10620eb68017951d02d7ae69a9 @kindly kindly committed Apr 15, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 ckanext/datastorer/plugin.py
@@ -16,6 +16,10 @@ class WebstorerPlugin(SingletonPlugin):
"""
implements(IDomainObjectModification, inherit=True)
implements(IResourceUrlChange)
+ implements(IConfigurable)
+
+ def configure(self, config):
+ self.site_url = config.get('ckan.site_url')
def notify(self, entity, operation=None):
if not isinstance(entity, model.Resource):
@@ -35,7 +39,7 @@ def _create_datastorer_task(self, resource):
'defer_commit': True}, {})
context = json.dumps({
- 'site_url': h.url_for('/', qualified = True),
+ 'site_url': self.site_url,
'apikey': user.get('apikey'),
'site_user_apikey': user.get('apikey'),
'username': user.get('name'),

0 comments on commit fb542fd

Please sign in to comment.