Format and connection of plugins

The form of plugins

Plugin is a set of external classes-resources connected to Geomongo. Technically, plugin is a python-package (directory with source code files and file __init__.py) satisfying the following rules:

  • it contains file main.py;
  • the name of directory should be written by latin lowercase letters  and underscores should be used instead of space characters.

Directory with plugins for installed application: /var/www/geomongo/plugins.

File  main.py should contain:

  • function getPluginResources() which returns dictionary with couples ‘link’: Resource’s derived class;
  • function getPluginInfo() which returns string description of the plugin.

Plugin connection

  • the directory of plugin should be copied to  /var/www/geomongo/plugins
  • to activate the plugin administrator should run the query /<geo2tag_root_prefix>/manage_plugins?plugin_name=true (issue GT-1421)
  • to get list of enabled plugins administrator should run the query /<geo2tag_root_prefix>/plugin (issue GT-1421).
ShareShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInShare on VKEmail this to someone

Leave a Reply

Your email address will not be published. Required fields are marked *