From 58d2abc7399cf506d96ff95785c2143a0f958b80 Mon Sep 17 00:00:00 2001 From: richard Date: Mon, 30 Jul 2001 01:28:17 +0000 Subject: [PATCH] Support for determining the installed tempaltes git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@152 57a73879-2fb5-44c3-a270-3262357dd7e2 --- roundup/templates/__init__.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/roundup/templates/__init__.py b/roundup/templates/__init__.py index 139597f..c61c1af 100644 --- a/roundup/templates/__init__.py +++ b/roundup/templates/__init__.py @@ -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 -- 2.30.2