Code

Support for determining the installed tempaltes
authorrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Mon, 30 Jul 2001 01:28:17 +0000 (01:28 +0000)
committerrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Mon, 30 Jul 2001 01:28:17 +0000 (01:28 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@152 57a73879-2fb5-44c3-a270-3262357dd7e2

roundup/templates/__init__.py

index 139597f9cb07c5d48bed18984ec4747f4b4f3438..c61c1af781b542dc3b682581540030c7bb102ad9 100644 (file)
@@ -1,2 +1,12 @@
+import os
 
+def listTemplates():
+    t_dir = os.path.split(__file__)[0]
+    l = []
+    for entry in os.listdir(t_dir):
+        # this isn't strictly necessary - the CVS dir won't be distributed
+        if entry == 'CVS': continue
+        if os.path.isdir(os.path.join(t_dir, entry)):
+            l.append(entry)
+    return l