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
import datetime
import copy
import mimetypes
import routes
import re
import time
import urlparse
from requests.packages import urllib3
......@@ -34,6 +36,12 @@ def load_config(ckan_ini_filepath):
import ckan
ckan.config.environment.load_environment(conf.global_conf,
conf.local_conf)
## give routes enough information to run url_for
parsed = urlparse.urlparse(conf.get('ckan.site_url', 'http://0.0.0.0'))
request_config = routes.request_config()
request_config.host = parsed.netloc + parsed.path
request_config.protocol = parsed.scheme
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