From 66e3d79fcd7c78496a8103d186376fb5c5d9c87f Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Mon, 2 Sep 2013 10:35:13 +0200 Subject: [PATCH] wcsinstd: pass the received site_options_cfg record to the site-options.cfg template file refs #3193 --- wcsinst/wcsinstd/deploy.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/wcsinst/wcsinstd/deploy.py b/wcsinst/wcsinstd/deploy.py index 92eb814..6f690c7 100644 --- a/wcsinst/wcsinstd/deploy.py +++ b/wcsinst/wcsinstd/deploy.py @@ -25,9 +25,10 @@ class DeployInstance(object): skel_dir = None collectivity_install_dir = None - def __init__(self, domain, title): + def __init__(self, domain, title, site_options_cfg): self.domain = domain self.title = title + self.site_options_cfg = site_options_cfg def make(self): self.skel_dir = os.path.join(settings.MEDIA_ROOT, 'skeletons', self.skeleton) @@ -202,7 +203,11 @@ class DeployInstance(object): return options_template = file(options_template_path).read() file(os.path.join(self.collectivity_install_dir, 'site-options.cfg'), 'w').write( - string.Template(options_template).substitute({'domain': self.domain})) + string.Template(options_template).substitute({ + 'domain': self.domain, + 'options': self.site_options_cfg + }) + ) def make_apache_vhost(self):