Переглянути джерело

Fancy templates are now part of the distribution

oz123 10 роки тому
батько
коміт
6fd6dab9db
2 змінених файлів з 5 додано та 2 видалено
  1. 1 0
      MANIFEST.in
  2. 4 2
      scripts/webui.py

+ 1 - 0
MANIFEST.in

@@ -1,4 +1,5 @@
 include ChangeLog
 include documentation/*
 include documentation/man_page/*
+include pwman/ui/templates/*
 include requirements.txt

+ 4 - 2
scripts/webui.py

@@ -181,8 +181,10 @@ def listnodes():
         TAGS = list(set([''.join(node.tags).strip() for node in nodes]))
         TAGS.sort()
         TAGS.insert(0, 'None')
-        print(len(TAGS))
-    html_nodes = template(tmplt, nodes=nodes, tags=TAGS)
+
+    html_nodes = template("main.tpl", nodes=nodes, tags=TAGS,
+                          template_lookup=[resource_filename('pwman',
+                                                             'ui/templates')])
     return html_nodes
 
 debug(True)