a first working mechanism based on Prelude class and requirements()
[unfold.git] / plugins / simplelist.py
index 5a97fcb..7a69939 100644 (file)
@@ -1,9 +1,18 @@
+from django.template.loader import render_to_string
+
 from engine.plugin import Plugin
 
 class SimpleList (Plugin) :
-    
-    def render_content (self):
-        return """<ul><li>hard-wired one</li><li>manual two</li>
-<li>this is defined</li>
-<li>in plugins.simplelist.py</li>
-</ul>"""
+
+    # SimpleList is useless per se anyways
+    def title (self) : return "Title for Simple List"
+
+    def template (self): return "simplelist.html"
+
+    def requirements (self):
+        return { 'js_files' : [ "js/simplelist.js" ],
+                 'css_files': [ "css/simplelist.css" ],
+# for tests
+#                 'js_chunks' : "/* a javascript chunk */",       
+#                 'css_chunks': "/* a css style */ ",
+                 }