예제 #1
0
 def check_vars(self, vars, cmd):
     result = BaseTemplate.check_vars(self, vars, cmd)
     if not vars['zope_password']:
         # for this to work you'll need pwgen installed
         passwd = run_cmd('pwgen -acn 9 1')
         if not passwd:
             passwd = 'admin'
         result['zope_password'] = passwd
     if not vars['staff_password']:
         # for this to work you'll need pwgen installed
         passwd = run_cmd('pwgen -acn 9 1')
         if not passwd:
             passwd = 'changeme'
         result['staff_password'] = passwd
     if int(result['plone_version'].split('.')[0]) < 4:
         self.required_structures.append('bootstrap')
     if vars['unified_buildout']:
         self.required_structures.append('unified')
     if vars['include_content']:
         self.required_structures.append('content_pkg')
     if vars['include_policy']:
         self.required_structures.append('policy_pkg')
     if vars['include_theme']:
         self.required_structures.append('theme_pkg')
     # XXX: var.structures can't handle this case yet
     if vars['project_name']:
         self.required_structures.append('buildouthttp')
     return result
예제 #2
0
 def check_vars(self, vars, cmd):
     result = BaseTemplate.check_vars(self, vars, cmd)
     # Add a db password for the project user
     passwd = run_cmd('pwgen -acn 9 1')
     if not passwd:
         passwd = 'admin'
     result['db_password'] = passwd
     # XXX: var.structures can't handle this case yet
     if vars['project_name']:
         self.required_structures.append('buildouthttp')
     return result
예제 #3
0
 def check_vars(self, vars, cmd):
     result = BaseTemplate.check_vars(self, vars, cmd)
     if vars['project_name']:
         self.required_structures.append('buildouthttp')
     return result