equal
deleted
inserted
replaced
1 """Specific views for entities implementing IDownloadable |
1 # organization: Logilab |
2 |
2 # copyright: 2001-2010 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2. |
3 :organization: Logilab |
3 # contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr |
4 :copyright: 2001-2010 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2. |
4 # license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses |
5 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr |
|
6 :license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses |
|
7 """ |
5 """ |
8 |
6 Standard interfaces. |
|
7 |
|
8 .. note:: |
|
9 |
|
10 The `implements` selector matches not only entity classes but also |
|
11 their interfaces. Writing __select__ = implements('IGeocodable') is |
|
12 a perfectly fine thing to do. |
|
13 """ |
9 __docformat__ = "restructuredtext en" |
14 __docformat__ = "restructuredtext en" |
10 |
15 |
11 from logilab.common.interface import Interface |
16 from logilab.common.interface import Interface |
12 |
17 |
13 class IEmailable(Interface): |
18 class IEmailable(Interface): |
157 |
162 |
158 |
163 |
159 class IBreadCrumbs(Interface): |
164 class IBreadCrumbs(Interface): |
160 """interface for entities which can be "located" on some path""" |
165 """interface for entities which can be "located" on some path""" |
161 |
166 |
|
167 # XXX fix recurs ! |
162 def breadcrumbs(self, view, recurs=False): |
168 def breadcrumbs(self, view, recurs=False): |
163 """return a list containing some: |
169 """return a list containing some: |
164 |
170 |
165 * tuple (url, label) |
171 * tuple (url, label) |
166 * entity |
172 * entity |