From 1323db043d9f4c7b6b013e5ee9dfd64014348e25 Mon Sep 17 00:00:00 2001 From: Michael Gallaspy Date: Mon, 21 Sep 2015 16:29:19 -0700 Subject: [PATCH 1/2] Add get_cookie to base module & global scope Add it to the global scope, so that it can be accessed by inline JS in central server templates. --- .../distributed/static/js/distributed/bundle_modules/base.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kalite/distributed/static/js/distributed/bundle_modules/base.js b/kalite/distributed/static/js/distributed/bundle_modules/base.js index 875309d4af..7801d0d6a1 100644 --- a/kalite/distributed/static/js/distributed/bundle_modules/base.js +++ b/kalite/distributed/static/js/distributed/bundle_modules/base.js @@ -14,6 +14,9 @@ require("browsernizr/test/canvas"); require("browsernizr/test/touchevents"); var Modernizr = require("browsernizr"); +// Expose this as a global object for use in central server inline JS. +global.getCookie = require("utils/get_cookie"); + global.$ = $; global._ = _; global.sessionModel = new SessionModel(); From cd4cb4170afdf577ca8087341f80ba414dee4a99 Mon Sep 17 00:00:00 2001 From: Michael Gallaspy Date: Mon, 21 Sep 2015 18:12:08 -0700 Subject: [PATCH 2/2] Do not use os-specific separator --- python-packages/fle_utils/django_utils/command.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-packages/fle_utils/django_utils/command.py b/python-packages/fle_utils/django_utils/command.py index 7f8f09e2bc..48a18c03a1 100644 --- a/python-packages/fle_utils/django_utils/command.py +++ b/python-packages/fle_utils/django_utils/command.py @@ -153,7 +153,7 @@ def call_outside_command_with_output(command, *args, **kwargs): # build the command if kalite_dir: - kalite_bin = os.path.join(kalite_dir, "bin/kalite") + kalite_bin = os.path.join(kalite_dir, "bin", "kalite") else: kalite_bin = 'kalite'