Mercurial > hg > decoupage
comparison 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 |
comparison
equal
deleted
inserted
replaced
15:8923fda80bd4 | 16:985b3a7e0e88 |
---|---|
105 f['description'] = description | 105 f['description'] = description |
106 else: | 106 else: |
107 f['title'] = f['description'] | 107 f['title'] = f['description'] |
108 f['description'] = None | 108 f['description'] = None |
109 | 109 |
110 class CSS(object): | |
111 """specify CSS""" | |
112 | |
113 def __init__(self, arg): | |
114 self.css = arg.split() | |
115 def __call__(self, request, data): | |
116 data['stylesheets'] = self.css | |
117 | |
118 class Include(object): | |
119 """include a file at the top of the body""" | |
120 | |
121 def __init__(self, arg): | |
122 self.include = arg | |
123 def __call__(self, request, data): | |
124 data['include'] = self.include | |
125 | |
110 | 126 |
111 def formatters(): | 127 def formatters(): |
112 formatters = {} | 128 formatters = {} |
113 for entry_point in iter_entry_points('decoupage.formatters'): | 129 for entry_point in iter_entry_points('decoupage.formatters'): |
114 try: | 130 try: |