Browse Source

Fixed bug found when start running designer page.

Signed-off-by: chanhoonseng <chanhoonseng3101@gmail.com>
chanhoonseng 6 years ago
parent
commit
2a0184d79b
2 changed files with 6 additions and 3 deletions
  1. 4 1
      core.py
  2. 2 2
      start.py

+ 4 - 1
core.py

@@ -189,10 +189,13 @@ class DesignerHandler(tornado.web.RequestHandler):
         else:
             index_data = cache_data
 
+        if index_data is not None:
+	    index_data = sorted(index_data)
+
         data = {
             "cache": cache_data,
             "style": style_data,
-            "index": sorted(index_data),
+            "index": index_data,
         }
 
         if "background" in config:

+ 2 - 2
start.py

@@ -45,12 +45,12 @@ def main():
     port = raw_input("> Please enter the port number: [%s] " %default_port)
     if not port:
         port = default_port    
-    default_title = 'My Project'
+    default_title = 'MyProject'
     title = raw_input("> Please enter the project title: [%s] " %default_title)
     if not title:
         title = default_title
 
-    os.makedirs("static/"+title+"/images")
+    os.makedirs("static/"+title.lower()+"/images")
 
     # Define a dictionary for the user input  
     config = {