Browse Source

Fixed Controller are not working

bugfixes
gau1991 10 years ago
parent
commit
dd3b143a5f
  1. 2
      ee/cli/bootstrap.py
  2. 4
      ee/cli/controllers/site.py

2
ee/cli/bootstrap.py

@ -5,6 +5,8 @@
from cement.core import handler from cement.core import handler
from ee.cli.controllers.base import EEBaseController from ee.cli.controllers.base import EEBaseController
from ee.cli.controllers.site import EESiteController
def load(app): def load(app):
handler.register(EEBaseController) handler.register(EEBaseController)
handler.register(EESiteController)

4
ee/cli/controllers/site.py

@ -5,10 +5,10 @@ from cement.core.controller import CementBaseController, expose
class EESiteController(CementBaseController): class EESiteController(CementBaseController):
class Meta: class Meta:
label = 'site' label = 'site'
interface = controller.IController
stacked_on = 'base' stacked_on = 'base'
stacked_type = 'nested' stacked_type = 'nested'
description = 'site command manges website configuration with the help of the following subcommands' description = 'site command manges website configuration with the help of the following subcommands'
arguments = [
(['-f', '--foo'], (['-f', '--foo'],
dict(help='the notorious foo option', dest='foo', action='store', dict(help='the notorious foo option', dest='foo', action='store',
metavar='TEXT') ), metavar='TEXT') ),
@ -16,7 +16,7 @@ class EESiteController(CementBaseController):
@expose(hide=True) @expose(hide=True)
def default(self): def default(self):
print "Inside EESiteController.default()." print("Inside EESiteController.default().")
# If using an output handler such as 'mustache', you could also # If using an output handler such as 'mustache', you could also
# render a data dictionary using a template. For example: # render a data dictionary using a template. For example:

Loading…
Cancel
Save