X-Git-Url: http://git.onelab.eu/?p=myslice.git;a=blobdiff_plain;f=manifoldapi%2Fmanifoldproxy.py;h=5268f41e70e112e9a020f320dfe14f0bef2ecb6a;hp=0f700bf7c3f5cfc14c24144bdba15a6e3a7542f0;hb=a948414844c79472807c5e66939a912a7b990433;hpb=b8108bef77d0feb75134229923ebe2dc1e9a1700 diff --git a/manifoldapi/manifoldproxy.py b/manifoldapi/manifoldproxy.py index 0f700bf7..5268f41e 100644 --- a/manifoldapi/manifoldproxy.py +++ b/manifoldapi/manifoldproxy.py @@ -31,7 +31,12 @@ debug_empty=False # myslice/urls.py # as well as # static/js/manifold.js -def proxy (request,format): +def proxy(request, format): + from myslice.settings import config + url = config.manifold_url() + return _proxy(url, request, format) + +def _proxy(url, request, format): """the view associated with /manifold/proxy/ with the query passed using POST""" # expecting a POST @@ -71,7 +76,7 @@ def proxy (request,format): return HttpResponse (json.dumps({'code':0,'value':[]}), content_type="application/json") # actually forward - manifold_api= ManifoldAPI(auth=manifold_api_session_auth) + manifold_api= ManifoldAPI(url, auth=manifold_api_session_auth) # for the benefit of the python code, manifoldAPI raises an exception if something is wrong # however in this case we want to propagate the complete manifold result to the js world