From fa1cf5ef34e684b58433119d78dc95923955ff4f Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 26 Oct 2015 15:35:07 +0000 Subject: [PATCH] Move static folder into synapse This is because otherwise it won't get picked up by python packaging. This also fixes the problem where the "static" folder was found if synapse wasn't started from that directory. --- synapse/app/homeserver.py | 4 +++- {static => synapse/static}/client/register/index.html | 0 .../static}/client/register/js/jquery-2.1.3.min.js | 0 .../static}/client/register/js/recaptcha_ajax.js | 0 {static => synapse/static}/client/register/js/register.js | 0 .../static}/client/register/register_config.sample.js | 0 {static => synapse/static}/client/register/style.css | 0 7 files changed, 3 insertions(+), 1 deletion(-) rename {static => synapse/static}/client/register/index.html (100%) rename {static => synapse/static}/client/register/js/jquery-2.1.3.min.js (100%) rename {static => synapse/static}/client/register/js/recaptcha_ajax.js (100%) rename {static => synapse/static}/client/register/js/register.js (100%) rename {static => synapse/static}/client/register/register_config.sample.js (100%) rename {static => synapse/static}/client/register/style.css (100%) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index cf2fa221d..a77535a4e 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -132,7 +132,9 @@ class SynapseHomeServer(HomeServer): def build_resource_for_static_content(self): # This is old and should go away: not going to bother adding gzip - return File("static") + return File( + os.path.join(os.path.dirname(synapse.__file__), "static") + ) def build_resource_for_content_repo(self): return ContentRepoResource( diff --git a/static/client/register/index.html b/synapse/static/client/register/index.html similarity index 100% rename from static/client/register/index.html rename to synapse/static/client/register/index.html diff --git a/static/client/register/js/jquery-2.1.3.min.js b/synapse/static/client/register/js/jquery-2.1.3.min.js similarity index 100% rename from static/client/register/js/jquery-2.1.3.min.js rename to synapse/static/client/register/js/jquery-2.1.3.min.js diff --git a/static/client/register/js/recaptcha_ajax.js b/synapse/static/client/register/js/recaptcha_ajax.js similarity index 100% rename from static/client/register/js/recaptcha_ajax.js rename to synapse/static/client/register/js/recaptcha_ajax.js diff --git a/static/client/register/js/register.js b/synapse/static/client/register/js/register.js similarity index 100% rename from static/client/register/js/register.js rename to synapse/static/client/register/js/register.js diff --git a/static/client/register/register_config.sample.js b/synapse/static/client/register/register_config.sample.js similarity index 100% rename from static/client/register/register_config.sample.js rename to synapse/static/client/register/register_config.sample.js diff --git a/static/client/register/style.css b/synapse/static/client/register/style.css similarity index 100% rename from static/client/register/style.css rename to synapse/static/client/register/style.css