split unfold and unfold-ssl so we can enable only the non-SSL stuff; the SSL service...
[myslice.git] / plugins / myplugin / __init__.py
1 from unfold.plugin import Plugin
2
3 class MyPlugin(Plugin):
4     
5     def __init__ (self, query=None, **settings):
6         Plugin.__init__ (self, **settings)
7         self.query=query
8
9     def template_file (self):
10         return "myplugin.html"
11
12     def requirements (self):
13         reqs = {
14             'js_files' : [
15                 'js/myplugin.js'
16             ],
17             'css_files': [
18                 'css/myplugin.css',
19             ]
20         }
21         return reqs
22
23     def json_settings_list (self):
24         # query_uuid will pass self.query results to the javascript
25         # and will be available as "record" in :
26         # on_new_record: function(record)
27         return ['plugin_uuid', 'domid', 'query_uuid']
28
29     def export_json_settings (self):
30         return True