forget about manage.py collectstatic and come up with our own brew
[myslice.git] / plugins / tabs.py
index 46e404b..d487eec 100644 (file)
@@ -2,24 +2,11 @@ from engine.composite import Composite
 
 class Tabs (Composite):
     
-    def title (self): 
-        return "Some tabs"
-
     def requirements (self):
-        return { 'js_files'     : 'bootstrap/js/bootstrap.js',
-                 'css_files'    : 'bootstrap/css/bootstrap.css' }
+        return { 'js_files'     : 'js/bootstrap.js',
+                 'css_files'    : ['css/bootstrap.css', 'css/tabs.css', ] 
+                 }
 
-    def template (self):
+    def template_file (self):
         return "tabs.html"
-    
-    def render_env (self, request):
-        env = {}
-        sons_rendered = [ son.render(request) for son in self.sons ]
-        sons_titles = [ son.title() for son in self.sons ]
-        ids = range (len(self.sons))
-        # for now we don't have a title to pass
-        sons = [ { 'id':id, 'rendered':rendered, 'title':title } 
-                 for id,rendered,title in zip (ids, sons_rendered, sons_titles) ]
-        env['sons']=sons
-        return env
-    
+