Back to index

plone3  3.1.7
Classes | Functions | Variables
kss.core.pluginregistry.json.utils Namespace Reference

Classes

class  JsonCommandView
class  KSSCommandWriter

Functions

def getJsonAddonFiles

Variables

tuple logger = logging.getLogger('kss.core')

Detailed Description

\
Supplemental support for json plugins

Function Documentation

Definition at line 13 of file utils.py.

00013 
00014 def getJsonAddonFiles():
00015     'Gets the addon javascript files for json'
00016     files = []
00017     # Try adding the jsonserver files
00018     request = TestRequest()
00019     try:
00020         # use the files already registered to that concat resource
00021         jsonrpc = capi.getAdapter(request, Interface, 'jsonrpc.js')
00022     except capi.ComponentLookupError:
00023         pass    # JSON not present.
00024     else:
00025         # JSON present.
00026         files.extend(jsonrpc.context.context.getPathList())
00027         # add the json kukit support file
00028         plugins_dir = os.path.split(globals()['__file__'])[0]
00029         files.append(os.path.join(plugins_dir, 'browser', 'jsonkukit.js'))
00030         logger.info('Lazy plugin construction: Installed support for JSON-RPC transport.')
00031     return files


Variable Documentation

tuple kss.core.pluginregistry.json.utils.logger = logging.getLogger('kss.core')

Definition at line 11 of file utils.py.