diff src/twisted/plugins/libervia_server.py @ 704:5319110a862c

server_side: static blog uses the default template
author souliane <souliane@mailoo.org>
date Thu, 04 Jun 2015 12:39:27 +0200
parents 2a4e071633f7
children bf562fb9c273
line wrap: on
line diff
--- a/src/twisted/plugins/libervia_server.py	Thu Jun 04 11:56:34 2015 +0200
+++ b/src/twisted/plugins/libervia_server.py	Thu Jun 04 12:39:27 2015 +0200
@@ -52,11 +52,11 @@
 
 def coerceDataDir(value):  # called from Libervia.OPT_PARAMETERS
     html = os.path.join(value, C.HTML_DIR)
-    if not os.path.isfile(os.path.join(html, 'libervia.html')):
+    if not os.path.isfile(os.path.join(html, C.LIBERVIA_MAIN_PAGE)):
         raise ValueError("%s is not a Libervia's browser HTML directory" % os.path.realpath(html))
-    server_css = os.path.join(value, C.SERVER_CSS_DIR)
-    if not os.path.isfile(os.path.join(server_css, 'blog.css')):
-        raise ValueError("%s is not a Libervia's server data directory" % os.path.realpath(server_css))
+    themes_dir = os.path.join(value, C.THEMES_DIR)
+    if not os.path.isfile(os.path.join(themes_dir, 'default/index.html')):
+        raise ValueError("%s is not a Libervia's server data directory" % os.path.realpath(themes_dir))
     return value
 
 DATA_DIR_DEFAULT = ''