cubicweb/pyramid/pyramidctl.py
changeset 12053 c3c9f2e1424c
parent 12003 5236ce988805
child 12216 4de5927871f9
equal deleted inserted replaced
12052:1a1d2f5faddb 12053:c3c9f2e1424c
    39 
    39 
    40 from cubicweb import ExecutionError
    40 from cubicweb import ExecutionError
    41 from cubicweb.cwconfig import CubicWebConfiguration as cwcfg
    41 from cubicweb.cwconfig import CubicWebConfiguration as cwcfg
    42 from cubicweb.cwctl import CWCTL, InstanceCommand, init_cmdline_log_threshold
    42 from cubicweb.cwctl import CWCTL, InstanceCommand, init_cmdline_log_threshold
    43 from cubicweb.pyramid import wsgi_application_from_cwconfig
    43 from cubicweb.pyramid import wsgi_application_from_cwconfig
    44 from cubicweb.server import set_debug
    44 from cubicweb.server import serverctl, set_debug
       
    45 from cubicweb.web.webctl import WebCreateHandler
    45 
    46 
    46 import waitress
    47 import waitress
    47 
    48 
    48 MAXFD = 1024
    49 MAXFD = 1024
    49 
    50 
    50 DBG_FLAGS = ('RQL', 'SQL', 'REPO', 'HOOKS', 'OPS', 'SEC', 'MORE')
    51 DBG_FLAGS = ('RQL', 'SQL', 'REPO', 'HOOKS', 'OPS', 'SEC', 'MORE')
    51 LOG_LEVELS = ('debug', 'info', 'warning', 'error')
    52 LOG_LEVELS = ('debug', 'info', 'warning', 'error')
       
    53 
       
    54 
       
    55 class PyramidCreateHandler(serverctl.RepositoryCreateHandler,
       
    56                            WebCreateHandler):
       
    57     cfgname = 'pyramid'
       
    58 
       
    59     def bootstrap(self, cubes, automatic=False, inputlevel=0):
       
    60         serverctl.RepositoryCreateHandler.bootstrap(self, cubes, automatic, inputlevel)
       
    61         # Call WebCreateHandler.bootstrap to prompt about get anonymous-user.
       
    62         WebCreateHandler.bootstrap(self, cubes, automatic, inputlevel)
       
    63         self.config.write_development_ini(cubes)
    52 
    64 
    53 
    65 
    54 class PyramidStartHandler(InstanceCommand):
    66 class PyramidStartHandler(InstanceCommand):
    55     """Start an interactive pyramid server.
    67     """Start an interactive pyramid server.
    56 
    68