diff decoupage/formatters.py @ 33:e384d4569ac3

include components necessary to make decoupage feel almost like a framework
author k0s <k0scist@gmail.com>
date Mon, 08 Feb 2010 11:40:57 -0500
parents 983c13e1b71f
children 527ccb76d043
line wrap: on
line diff
--- a/decoupage/formatters.py	Mon Feb 08 11:10:54 2010 -0500
+++ b/decoupage/formatters.py	Mon Feb 08 11:40:57 2010 -0500
@@ -143,6 +143,22 @@
     def __call__(self, request, data):
         data['css'] = self.css
 
+class JavaScript(object):
+    """specify JS for the page"""
+
+    def __init__(self, arg):
+        self.scripts = arg.split()
+    def __call__(self, request, data):
+        data['scripts'] = self.scripts
+
+class Favicon(object):
+    """specify favicons for the page"""
+
+    def __init__(self, icon):
+        self.icon = icon
+    def __call__(self, request, data):
+        data['icon'] = self.icon
+
 class Include(object):
     """include a file at the top of the body"""