diff --git a/neonsrv/interface.py b/neonsrv/interface.py index a984945..93ee26d 100644 --- a/neonsrv/interface.py +++ b/neonsrv/interface.py @@ -11,15 +11,16 @@ class RootHandler(tornado.web.RequestHandler): def get_files(self, document_type): - root_dir = os.path.abspath(conf.MEI_DIRECTORY) - mei_dir = os.path.join(root_dir, document_type) + if(document_type != "cheironomic"): + root_dir = os.path.abspath(conf.MEI_DIRECTORY) + mei_dir = os.path.join(root_dir, document_type) - # only list mei files (not jpeg) - meiFiles = [] - for f in os.listdir(mei_dir): - if f.endswith(".mei"): - meiFiles.append(f) - return meiFiles + # only list mei files (not jpeg) + meiFiles = [] + for f in os.listdir(mei_dir): + if f.endswith(".mei"): + meiFiles.append(f) + return meiFiles def get_document_types(self): mei_dir = os.path.abspath(conf.MEI_DIRECTORY) @@ -46,7 +47,7 @@ def get(self, url): elif url == "demo.html": self.render(url, squarenotefiles=self.get_files('squarenote'), - stafflessfiles=self.get_files('cheironomic'), + # stafflessfiles=self.get_files('cheironomic'), document_types=self.get_document_types(), errors="", prefix=conf.get_prefix()) @@ -103,7 +104,7 @@ def post(self, request): self.render("demo.html", squarenotefiles=self.get_files('squarenote'), - stafflessfiles=self.get_files('cheironomic'), + # stafflessfiles=self.get_files('cheironomic'), document_types=self.get_document_types(), errors=errors, prefix=conf.get_prefix()) diff --git a/templates/demo.html b/templates/demo.html index 221c357..1fd8c59 100644 --- a/templates/demo.html +++ b/templates/demo.html @@ -91,15 +91,15 @@