summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--service/pixelated/resources/__init__.py10
-rw-r--r--service/pixelated/resources/root_resource.py6
-rw-r--r--web-ui/setup.py1
3 files changed, 10 insertions, 7 deletions
diff --git a/service/pixelated/resources/__init__.py b/service/pixelated/resources/__init__.py
index 61e60720..9dae4a61 100644
--- a/service/pixelated/resources/__init__.py
+++ b/service/pixelated/resources/__init__.py
@@ -57,12 +57,14 @@ def handle_error_deferred(e, request):
request.finish()
-def get_protected_static_folder():
- return os.path.join(_get_static_folder(), 'protected')
+def get_protected_static_folder(static_folder=None):
+ static = static_folder or _get_static_folder()
+ return os.path.join(static, 'protected')
-def get_public_static_folder():
- return os.path.join(_get_static_folder(), 'public')
+def get_public_static_folder(static_folder=None):
+ static = static_folder or _get_static_folder()
+ return os.path.join(static, 'public')
def _get_static_folder():
diff --git a/service/pixelated/resources/root_resource.py b/service/pixelated/resources/root_resource.py
index 896bc24b..b014a590 100644
--- a/service/pixelated/resources/root_resource.py
+++ b/service/pixelated/resources/root_resource.py
@@ -50,10 +50,10 @@ MODE_RUNNING = 2
class RootResource(BaseResource):
- def __init__(self, services_factory):
+ def __init__(self, services_factory, static_folder=None):
BaseResource.__init__(self, services_factory)
- self._public_static_folder = get_public_static_folder()
- self._protected_static_folder = get_protected_static_folder()
+ self._public_static_folder = get_public_static_folder(static_folder)
+ self._protected_static_folder = get_protected_static_folder(static_folder)
self._html_template = open(os.path.join(self._protected_static_folder, 'index.html')).read()
self._services_factory = services_factory
self._child_resources = ChildResourcesMap()
diff --git a/web-ui/setup.py b/web-ui/setup.py
index 04c59be2..c6f99e74 100644
--- a/web-ui/setup.py
+++ b/web-ui/setup.py
@@ -39,6 +39,7 @@ setup(name='pixelated-www',
'sandbox.min.js',
'bower_components/jquery-file-upload/css/*',
'bower_components/font-awesome/css/*',
+ 'bower_components/font-awesome/fonts/*',
'css/*',
'fonts/*',
'locales/en-us/*',