Commit 12e73a99 authored by Alexandre Boeglin's avatar Alexandre Boeglin

We now look for business templates in every subdirectory of INSTANCE_HOME/bt5 .


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2295 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 08640f66
......@@ -137,11 +137,14 @@ class ERP5TypeTestCase(PortalTestCase):
LOG('template_list',0,template_list)
for template in template_list:
id = template
try:
try :
from urllib import urlretrieve
file, headers = urlretrieve(template)
except IOError:
template = INSTANCE_HOME + '/bt5/erp5_bt5/' + template
except IOError :
from glob import glob
template_list = glob(os.path.join(INSTANCE_HOME, 'bt5', '*', '%s.bt5' % template))
template = len(template_list) and template_list[0] or '%s.bt5' % id
else :
template = '%s.bt5' % template
new_template_list.append((template,id))
LOG('new_template_list',0,template_list)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment