author | Sylvain Thénault <sylvain.thenault@logilab.fr> |
Wed, 23 Sep 2009 12:23:14 +0200 | |
changeset 3417 | fb17a54b358c |
parent 3377 | dd9d292b6a6d |
child 3451 | 6b46d73823f5 |
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 |
|
1977
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
5 |
:copyright: 2001-2009 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): |
|
17 |
_ = self.req._ |
|
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): |
|
25 |
_ = self.req._ |
|
26 |
self.w(u"<h1>%s</h1>" % |
|
27 |
_('an error occured, the request cannot be fulfilled')) |