equal
deleted
inserted
replaced
|
1 # |
|
2 # Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net> |
|
3 # All Rights Reserved. |
|
4 # |
|
5 # This software is subject to the provisions of the Zope Public License, |
|
6 # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. |
|
7 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED |
|
8 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
|
9 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS |
|
10 # FOR A PARTICULAR PURPOSE. |
|
11 # |
|
12 |
|
13 __docformat__ = 'restructuredtext' |
|
14 |
|
15 |
|
16 # import standard library |
|
17 |
|
18 # import interfaces |
|
19 |
|
20 # import packages |
|
21 from zope.interface import Interface, Attribute |
|
22 |
|
23 from pyams_utils import _ |
|
24 |
|
25 |
|
26 class IHTMLRenderer(Interface): |
|
27 """Text renderer interface |
|
28 |
|
29 HTML renderers are implemented as adapters for a source object (which can |
|
30 be a string) and a request, so that you can easily implement custom renderers |
|
31 for any object and/or for any request layer. |
|
32 """ |
|
33 |
|
34 title = Attribute(_("Renderer name")) |
|
35 |
|
36 def render(self, **kwargs): |
|
37 """Render adapted text""" |