equal
deleted
inserted
replaced
32 |
32 |
33 from cubicweb.cwconfig import CONFIGURATIONS |
33 from cubicweb.cwconfig import CONFIGURATIONS |
34 from cubicweb.web.webconfig import WebConfiguration |
34 from cubicweb.web.webconfig import WebConfiguration |
35 |
35 |
36 |
36 |
37 class TwistedConfiguration(WebConfiguration): |
37 class WebConfigurationBase(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 |
39 |
40 options = merge_options(( |
40 options = merge_options(( |
41 # ctl configuration |
41 # ctl configuration |
42 ('port', |
42 ('port', |
107 |
107 |
108 |
108 |
109 try: |
109 try: |
110 from cubicweb.server.serverconfig import ServerConfiguration |
110 from cubicweb.server.serverconfig import ServerConfiguration |
111 |
111 |
112 class AllInOneConfiguration(TwistedConfiguration, ServerConfiguration): |
112 class AllInOneConfiguration(WebConfigurationBase, ServerConfiguration): |
113 """repository and web instance in the same twisted process""" |
113 """repository and web instance in the same twisted process""" |
114 name = 'all-in-one' |
114 name = 'all-in-one' |
115 options = merge_options(TwistedConfiguration.options |
115 options = merge_options(WebConfigurationBase.options |
116 + ServerConfiguration.options) |
116 + ServerConfiguration.options) |
117 |
117 |
118 cubicweb_appobject_path = TwistedConfiguration.cubicweb_appobject_path | ServerConfiguration.cubicweb_appobject_path |
118 cubicweb_appobject_path = WebConfigurationBase.cubicweb_appobject_path | ServerConfiguration.cubicweb_appobject_path |
119 cube_appobject_path = TwistedConfiguration.cube_appobject_path | ServerConfiguration.cube_appobject_path |
119 cube_appobject_path = WebConfigurationBase.cube_appobject_path | ServerConfiguration.cube_appobject_path |
120 def pyro_enabled(self): |
120 def pyro_enabled(self): |
121 """tell if pyro is activated for the in memory repository""" |
121 """tell if pyro is activated for the in memory repository""" |
122 return self['pyro-server'] |
122 return self['pyro-server'] |
123 |
123 |
124 |
124 |