web/webctl.py
changeset 601 a9e65aff3049
parent 0 b97547f5f1fa
child 1132 96752791c2b6
equal deleted inserted replaced
600:1fbf11a876a8 601:a9e65aff3049
     1 """cubicweb-ctl commands and command handlers common to twisted/modpython
     1 """cubicweb-ctl commands and command handlers common to twisted/modpython
     2 web configuration
     2 web configuration
     3 
     3 
     4 :organization: Logilab
     4 :organization: Logilab
     5 :copyright: 2001-2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     5 :copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     6 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
     6 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
     7 """
     7 """
     8 __docformat__ = "restructuredtext en"
     8 __docformat__ = "restructuredtext en"
     9 
     9 
    10 from cubicweb.toolsutils import CommandHandler
    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     
    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     
    25         if confirm('allow anonymous access', False):
       
    26            config.global_set_option('anonymous-user', 'anon') 
       
    27            config.global_set_option('anonymous-password', 'anon') 
       
    28         
    26     def postcreate(self):
    29     def postcreate(self):
    27         """hooks called once application's initialization has been completed"""
    30         """hooks called once application's initialization has been completed"""
    28         
    31