etwist/twconfig.py
changeset 9251 e4d753c8b1c4
parent 8989 8742f4bf029f
child 9252 01bca75ee8bd
equal deleted inserted replaced
9250:0dcc68dd8458 9251:e4d753c8b1c4
    34 from cubicweb.web.webconfig import WebConfiguration
    34 from cubicweb.web.webconfig import WebConfiguration
    35 
    35 
    36 
    36 
    37 class TwistedConfiguration(WebConfiguration):
    37 class TwistedConfiguration(WebConfiguration):
    38     """web instance (in a twisted web server) client of a RQL server"""
    38     """web instance (in a twisted web server) client of a RQL server"""
    39     name = 'twisted'
       
    40 
    39 
    41     options = merge_options((
    40     options = merge_options((
    42         # ctl configuration
    41         # ctl configuration
    43         ('port',
    42         ('port',
    44          {'type' : 'int',
    43          {'type' : 'int',
   105     def default_base_url(self):
   104     def default_base_url(self):
   106         from socket import getfqdn
   105         from socket import getfqdn
   107         return 'http://%s:%s/' % (self['host'] or getfqdn(), self['port'] or 8080)
   106         return 'http://%s:%s/' % (self['host'] or getfqdn(), self['port'] or 8080)
   108 
   107 
   109 
   108 
   110 CONFIGURATIONS.append(TwistedConfiguration)
       
   111 
       
   112 try:
   109 try:
   113     from cubicweb.server.serverconfig import ServerConfiguration
   110     from cubicweb.server.serverconfig import ServerConfiguration
   114 
   111 
   115     class AllInOneConfiguration(TwistedConfiguration, ServerConfiguration):
   112     class AllInOneConfiguration(TwistedConfiguration, ServerConfiguration):
   116         """repository and web instance in the same twisted process"""
   113         """repository and web instance in the same twisted process"""