Mercurial > hg > decoupage
diff decoupage/formatters.py @ 16:985b3a7e0e88
add formatters to include css and genshi templates
author | k0s <k0scist@gmail.com> |
---|---|
date | Fri, 25 Dec 2009 18:57:56 -0500 |
parents | 9f91acf9874c |
children | eab191e0b9b3 |
line wrap: on
line diff
--- a/decoupage/formatters.py Fri Dec 25 18:26:24 2009 -0500 +++ b/decoupage/formatters.py Fri Dec 25 18:57:56 2009 -0500 @@ -107,6 +107,22 @@ f['title'] = f['description'] f['description'] = None +class CSS(object): + """specify CSS""" + + def __init__(self, arg): + self.css = arg.split() + def __call__(self, request, data): + data['stylesheets'] = self.css + +class Include(object): + """include a file at the top of the body""" + + def __init__(self, arg): + self.include = arg + def __call__(self, request, data): + data['include'] = self.include + def formatters(): formatters = {}