author | Charles Hébert <charles.hebert@logilab.fr> |
Wed, 17 Feb 2010 15:57:03 +0100 | |
branch | stable |
changeset 4614 | 95ccd84c892b |
parent 4252 | 6c4f109c2b03 |
child 5421 | 8167de96c523 |
permissions | -rw-r--r-- |
0 | 1 |
"""Set of HTML errors views. Error view are generally implemented |
2 |
as startup views and are used for standard error pages (404, 500, etc.) |
|
3 |
||
4 |
:organization: Logilab |
|
4212
ab6573088b4a
update copyright: welcome 2010
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1977
diff
changeset
|
5 |
:copyright: 2001-2010 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2. |
0 | 6 |
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr |
1977
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
7 |
:license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses |
0 | 8 |
""" |
9 |
__docformat__ = "restructuredtext en" |
|
10 |
||
984 | 11 |
from cubicweb.view import StartupView |
0 | 12 |
|
13 |
class FourOhFour(StartupView): |
|
3377
dd9d292b6a6d
use __regid__ instead of id on appobject classes
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1977
diff
changeset
|
14 |
__regid__ = '404' |
0 | 15 |
|
16 |
def call(self): |
|
3451
6b46d73823f5
[api] work in progress, use __regid__, cw_*, etc.
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
3377
diff
changeset
|
17 |
_ = self._cw._ |
0 | 18 |
self.w(u"<h1>%s</h1>" % _('this resource does not exist')) |
19 |
||
20 |
||
21 |
class ErrorOccured(StartupView): |
|
3377
dd9d292b6a6d
use __regid__ instead of id on appobject classes
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1977
diff
changeset
|
22 |
__regid__ = '500' |
0 | 23 |
|
24 |
def call(self): |
|
3451
6b46d73823f5
[api] work in progress, use __regid__, cw_*, etc.
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
3377
diff
changeset
|
25 |
_ = self._cw._ |
0 | 26 |
self.w(u"<h1>%s</h1>" % |
27 |
_('an error occured, the request cannot be fulfilled')) |