cwctl.py
changeset 4620 c4adfc2466f5
parent 4610 7bf205b9a845
child 4656 027bbff3659f
equal deleted inserted replaced
4597:e872097f2287 4620:c4adfc2466f5
   295             print ', '.join(cwcfg.available_cubes())
   295             print ', '.join(cwcfg.available_cubes())
   296             return
   296             return
   297         # create the registry directory for this instance
   297         # create the registry directory for this instance
   298         print '\n'+underline_title('Creating the instance %s' % appid)
   298         print '\n'+underline_title('Creating the instance %s' % appid)
   299         create_dir(config.apphome)
   299         create_dir(config.apphome)
   300         # load site_cubicweb from the cubes dir (if any)
       
   301         config.load_site_cubicweb()
       
   302         # cubicweb-ctl configuration
   300         # cubicweb-ctl configuration
   303         print '\n'+underline_title('Configuring the instance (%s.conf)' % configname)
   301         print '\n'+underline_title('Configuring the instance (%s.conf)' % configname)
   304         config.input_config('main', self.config.config_level)
   302         config.input_config('main', self.config.config_level)
   305         # configuration'specific stuff
   303         # configuration'specific stuff
   306         print
   304         print
   307         helper.bootstrap(cubes, self.config.config_level)
   305         helper.bootstrap(cubes, self.config.config_level)
       
   306         # input for cubes specific options
       
   307         for section in set(sect.lower() for sect, opt, optdict in config.all_options()
       
   308                            if optdict.get('inputlevel') <= self.config.config_level):
       
   309             if section not in ('main', 'email', 'pyro'):
       
   310                 print '\n' + underline_title('%s options' % section)
       
   311                 config.input_config(section, self.config.config_level)
   308         # write down configuration
   312         # write down configuration
   309         config.save()
   313         config.save()
   310         self._handle_win32(config, appid)
   314         self._handle_win32(config, appid)
   311         print '-> generated %s' % config.main_config_file()
   315         print '-> generated %s' % config.main_config_file()
   312         # handle i18n files structure
   316         # handle i18n files structure