etwist/twctl.py
changeset 3890 d7a270f50f54
parent 3185 bd0126d17e83
parent 3821 653ddc1e4179
child 4252 6c4f109c2b03
--- a/etwist/twctl.py	Sun Nov 08 21:53:18 2009 +0100
+++ b/etwist/twctl.py	Fri Nov 20 19:35:54 2009 +0100
@@ -9,10 +9,14 @@
 import sys
 
 from cubicweb.toolsutils import CommandHandler
+from cubicweb.web.webctl import WebCreateHandler
 
 # trigger configuration registration
 import cubicweb.etwist.twconfig # pylint: disable-msg=W0611
 
+class TWCreateHandler(WebCreateHandler):
+    cfgname = 'twisted'
+
 class TWStartHandler(CommandHandler):
     cmdname = 'start'
     cfgname = 'twisted'
@@ -28,8 +32,8 @@
 
 try:
     from cubicweb.server import serverctl
-
-    class AllInOneCreateHandler(serverctl.RepositoryCreateHandler):
+    class AllInOneCreateHandler(serverctl.RepositoryCreateHandler,
+                                TWCreateHandler):
         """configuration to get an instance running in a twisted web server
         integrating a repository server in the same process
         """
@@ -38,6 +42,7 @@
         def bootstrap(self, cubes, inputlevel=0):
             """bootstrap this configuration"""
             serverctl.RepositoryCreateHandler.bootstrap(self, cubes, inputlevel)
+            TWCreateHandler.bootstrap(self, cubes, inputlevel)
 
     class AllInOneStartHandler(TWStartHandler):
         cmdname = 'start'