소스 검색

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)