a first working mechanism based on Prelude class and requirements()
[unfold.git] / plugins / verticallayout.py
index 61f6cab..eeb134d 100644 (file)
@@ -1,18 +1,13 @@
 from django.template.loader import render_to_string
 
-from engine.plugin import Plugin
+from engine.composite import Composite
 
-class VerticalLayout (Plugin) :
+class VerticalLayout (Composite) :
     
-    def __init__ (self, sons=[], *args, **kwds):
-        self.sons=sons
-        Plugin.__init__ (self, *args, **kwds)
-        
-    def insert (self, plugin):
-        self.sons.append(plugin)
-
     def title (self) : return "VLayout title"
 
+    def template (self):        return "verticallayout.html"
+
     def render_env (self, request):
         env = {}
         sons_rendered = [ son.render(request) for son in self.sons ]
@@ -23,11 +18,4 @@ class VerticalLayout (Plugin) :
                  for id,rendered,title in zip (ids, sons_rendered, sons_titles) ]
         env['sons']=sons
         return env
-        
-
-    def template (self):        return "verticallayout.html"
-
-    def media_js ():            return [ 'js/simplelist.js' ]
-
-    def media_css ():           return { 'all': ('css/simplelist.css'), }