etwist/twconfig.py
changeset 2476 1294a6bdf3bf
parent 1977 606923dff11b
child 2657 de974465d381
equal deleted inserted replaced
2475:b6753521129d 2476:1294a6bdf3bf
     1 """twisted server configurations:
     1 """twisted server configurations:
     2 
     2 
     3 * the "twisted" configuration to get a web application running in a standalone
     3 * the "twisted" configuration to get a web instance running in a standalone
     4   twisted web server which talk to a repository server using Pyro
     4   twisted web server which talk to a repository server using Pyro
     5 
     5 
     6 * the "all-in-one" configuration to get a web application running in a twisted
     6 * the "all-in-one" configuration to get a web instance running in a twisted
     7   web server integrating a repository server in the same process (only available
     7   web server integrating a repository server in the same process (only available
     8   if the repository part of the software is installed
     8   if the repository part of the software is installed
     9 
     9 
    10 :organization: Logilab
    10 :organization: Logilab
    11 :copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2.
    11 :copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2.
    17 from os.path import join
    17 from os.path import join
    18 
    18 
    19 from cubicweb.web.webconfig import WebConfiguration, merge_options, Method
    19 from cubicweb.web.webconfig import WebConfiguration, merge_options, Method
    20 
    20 
    21 class TwistedConfiguration(WebConfiguration):
    21 class TwistedConfiguration(WebConfiguration):
    22     """web application (in a twisted web server) client of a RQL server"""
    22     """web instance (in a twisted web server) client of a RQL server"""
    23     name = 'twisted'
    23     name = 'twisted'
    24 
    24 
    25     options = merge_options((
    25     options = merge_options((
    26         # ctl configuration
    26         # ctl configuration
    27         ('host',
    27         ('host',
    79 
    79 
    80 try:
    80 try:
    81     from cubicweb.server.serverconfig import ServerConfiguration
    81     from cubicweb.server.serverconfig import ServerConfiguration
    82 
    82 
    83     class AllInOneConfiguration(TwistedConfiguration, ServerConfiguration):
    83     class AllInOneConfiguration(TwistedConfiguration, ServerConfiguration):
    84         """repository and web application in the same twisted process"""
    84         """repository and web instance in the same twisted process"""
    85         name = 'all-in-one'
    85         name = 'all-in-one'
    86         repo_method = 'inmemory'
    86         repo_method = 'inmemory'
    87         options = merge_options(TwistedConfiguration.options
    87         options = merge_options(TwistedConfiguration.options
    88                                 + ServerConfiguration.options)
    88                                 + ServerConfiguration.options)
    89 
    89