yourapp.whatever.controllers.LiteController
… and then int he plugin’s load()
function you would app.handler.register(AdvancedController, force=True)
which forces it to register overtop of the LiteController
(of the same label)
/etc/<project_name>/<project_name>.conf
self.app.config.get('section', 'option')
in the _setup
function of the plugin but is there a way retrieve that information without invoking app
?self.app.config.get
(understandable) you could create a shortcut like using get_section_dict
self.config = self.app.config.get_section_dict(‘my_plugin’)
… then just use self.config[‘my_key’]
through out your plugin
app
is passed to the _setup()
method … because that is called when the plugin is instantiated during app.setup()
. You should set self.app = app
in _setup()
.. or if you subclass from cement.core.handler.CementHandler
just make sure you super()
in _setup()
and it does that
app.setup()
you can access self.app
anywhere in the plugin class
boss
to create a cement-app
and also cement-plugin
? You need to configure plugin_config_dir
and plugin_dir
in a configuration file in order to find plugins..
.pyc
, and .pyo
) but that is easily reverse-engineerable and or doesn’t completely hide your code if I recall correctly
pyconcrete is an experimental project, there is always a way to decrypt .pye files, but pyconcrete just make it harder.
~/.yourapp.conf
or /etc/yourapp/yourapp.conf
, etc… then modifying the config should take affect
app.config.parse_file('%s/config/facetracker.conf' % os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))))
before app.run()
and it worked... I'd like default values in the project that can be superseded by the values in system and user configurations.