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