Commit 81584f3f authored by Marko Kuder's avatar Marko Kuder
Browse files

fix 'thread._local' object has no attribute 'host'

parent 0ebe8439
...@@ -10,8 +10,10 @@ import shutil ...@@ -10,8 +10,10 @@ import shutil
import datetime import datetime
import copy import copy
import mimetypes import mimetypes
import routes
import re import re
import time import time
import urlparse
from requests.packages import urllib3 from requests.packages import urllib3
...@@ -34,6 +36,12 @@ def load_config(ckan_ini_filepath): ...@@ -34,6 +36,12 @@ def load_config(ckan_ini_filepath):
import ckan import ckan
ckan.config.environment.load_environment(conf.global_conf, ckan.config.environment.load_environment(conf.global_conf,
conf.local_conf) conf.local_conf)
## give routes enough information to run url_for
parsed = urlparse.urlparse(conf.get('ckan.site_url', ''))
request_config = routes.request_config() = parsed.netloc + parsed.path
request_config.protocol = parsed.scheme
def register_translator(): def register_translator():
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment