From: richard Date: Mon, 30 Jul 2001 01:28:17 +0000 (+0000) Subject: Support for determining the installed tempaltes X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=58d2abc7399cf506d96ff95785c2143a0f958b80;p=roundup.git Support for determining the installed tempaltes git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@152 57a73879-2fb5-44c3-a270-3262357dd7e2 --- 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