uses messages:debug rather than console.log
[myslice.git] / plugins / updater / updater.py
diff --git a/plugins/updater/updater.py b/plugins/updater/updater.py
new file mode 100644 (file)
index 0000000..f7e4ddb
--- /dev/null
@@ -0,0 +1,28 @@
+from unfold.plugin import Plugin
+
+class Updater (Plugin):
+
+    def __init__ (self, query, label="Update", **settings):
+        Plugin.__init__ (self, **settings)
+        # xxx would make sense to check this is a Get query...
+        self.query=query
+        self.label=label
+
+    def template_file (self):
+        return "updater.html"
+
+    def requirements (self):
+        return {
+            'js_files' :  [ "js/updater.js" ],
+            'css_files' : "css/updater.css",
+            }
+
+    # although this has no query, we need a plugin instance to be created in the js output
+    def export_json_settings (self):     return True
+    # the js plugin expects a domid
+    def json_settings_list (self):       return [ 'plugin_uuid', 'query_uuid' ]
+
+    # and we don't need a spin wheel 
+    def start_with_spin (self):          return False
+
+    def default_togglable (self):        return False