|
|
|
@ -55,17 +55,17 @@ def _icode(_path,_root):
|
|
|
|
|
:path location of the project
|
|
|
|
|
"""
|
|
|
|
|
_code = """
|
|
|
|
|
import cms
|
|
|
|
|
#
|
|
|
|
|
# register this in config.plugins: {"demo":["info"]}
|
|
|
|
|
import cms
|
|
|
|
|
#
|
|
|
|
|
# register this in config.plugins: {"demo":["info"]}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@cms.plugins(mimetype='application/json') :
|
|
|
|
|
def info (**_args):
|
|
|
|
|
_request= _args['request']
|
|
|
|
|
_config = _args['config']
|
|
|
|
|
return {"version":_config['system']['version'],'title':_config['layout']['header']['title']}
|
|
|
|
|
pass
|
|
|
|
|
@cms.plugins(mimetype='application/json') :
|
|
|
|
|
def info (**_args):
|
|
|
|
|
_request= _args['request']
|
|
|
|
|
_config = _args['config']
|
|
|
|
|
return {"version":_config['system']['version'],'title':_config['layout']['header']['title']}
|
|
|
|
|
pass
|
|
|
|
|
"""
|
|
|
|
|
loc = os.sep.join([_path,_root,'_plugins','demo.py'])
|
|
|
|
|
f = open(loc,'w')
|
|
|
|
|