web/webctl.py
branchtls-sprint
changeset 1802 d628defebc17
parent 1132 96752791c2b6
child 1977 606923dff11b
equal deleted inserted replaced
1801:672acc730ce5 1802:d628defebc17
    10 from cubicweb.toolsutils import CommandHandler, confirm
    10 from cubicweb.toolsutils import CommandHandler, confirm
    11 
    11 
    12 
    12 
    13 class WebCreateHandler(CommandHandler):
    13 class WebCreateHandler(CommandHandler):
    14     cmdname = 'create'
    14     cmdname = 'create'
    15     
    15 
    16     def bootstrap(self, cubes, inputlevel=0):
    16     def bootstrap(self, cubes, inputlevel=0):
    17         """bootstrap this configuration"""
    17         """bootstrap this configuration"""
    18         print '** generic web configuration'
    18         print '** generic web configuration'
    19         config = self.config
    19         config = self.config
    20         if config.repo_method == 'pyro':
    20         if config.repo_method == 'pyro':
    21             print
    21             print
    22             print '** repository server configuration'
    22             print '** repository server configuration'
    23             print '-' * 72
    23             print '-' * 72
    24             config.input_config('pyro-client', inputlevel)
    24             config.input_config('pyro-client', inputlevel)
    25         if confirm('allow anonymous access', False):
    25         if confirm('allow anonymous access', False):
    26             config.global_set_option('anonymous-user', 'anon') 
    26             config.global_set_option('anonymous-user', 'anon')
    27             config.global_set_option('anonymous-password', 'anon') 
    27             config.global_set_option('anonymous-password', 'anon')
    28         
    28 
    29     def postcreate(self):
    29     def postcreate(self):
    30         """hooks called once application's initialization has been completed"""
    30         """hooks called once application's initialization has been completed"""
    31