author | Sylvain Thénault <sylvain.thenault@logilab.fr> |
Thu, 11 Mar 2010 16:49:59 +0100 | |
branch | stable |
changeset 4868 | e34cbd85d14d |
parent 4470 | 34f57659f90e |
child 5421 | 8167de96c523 |
permissions | -rw-r--r-- |
1977
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1358
diff
changeset
|
1 |
"""only for unit tests ! |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1358
diff
changeset
|
2 |
|
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1358
diff
changeset
|
3 |
:organization: Logilab |
4212
ab6573088b4a
update copyright: welcome 2010
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1977
diff
changeset
|
4 |
:copyright: 2001-2010 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2. |
1977
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1358
diff
changeset
|
5 |
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1358
diff
changeset
|
6 |
:license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1358
diff
changeset
|
7 |
""" |
0 | 8 |
|
1358 | 9 |
from cubicweb.view import EntityView |
10 |
from cubicweb.selectors import implements |
|
0 | 11 |
|
12 |
HTML_PAGE = u"""<html> |
|
13 |
<body> |
|
14 |
<h1>Hello World !</h1> |
|
15 |
</body> |
|
16 |
</html> |
|
17 |
""" |
|
18 |
||
19 |
class SimpleView(EntityView): |
|
4470
34f57659f90e
no needs for a views package, 3.6 api update
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
4212
diff
changeset
|
20 |
__regid__ = 'simple' |
1358 | 21 |
__select__ = implements('Bug',) |
0 | 22 |
|
23 |
def call(self, **kwargs): |
|
24 |
self.cell_call(0, 0) |
|
25 |
||
26 |
def cell_call(self, row, col): |
|
27 |
self.w(HTML_PAGE) |
|
28 |
||
29 |
class RaisingView(EntityView): |
|
4470
34f57659f90e
no needs for a views package, 3.6 api update
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
4212
diff
changeset
|
30 |
__regid__ = 'raising' |
1358 | 31 |
__select__ = implements('Bug',) |
0 | 32 |
|
33 |
def cell_call(self, row, col): |
|
34 |
raise ValueError() |