2 from myslice.configengine import ConfigEngine
3 from myslice.settings import TEMPLATE_DIRS
5 class ThemeView (object):
9 self.config = ConfigEngine()
10 if self.config.myslice.theme :
11 return self.config.myslice.theme
15 # Load a template from the theme directory if it exists
16 # else load it from the common templates dir
17 print "THEME = ",self.theme
18 print "TEMPLATE = ",self.template_name
19 print "TEMPLATE_DIRS = ",TEMPLATE_DIRS
20 filename = self.theme + '_' + self.template_name
21 print any(os.path.exists(os.path.join(d,filename)) for d in TEMPLATE_DIRS)
22 print (os.path.exists(os.path.join(d,filename)) for d in TEMPLATE_DIRS)
23 if any(os.path.exists(os.path.join(d,filename)) for d in TEMPLATE_DIRS):
26 return self.template_name