equal
deleted
inserted
replaced
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""" |