author | Sylvain Thénault <sylvain.thenault@logilab.fr> |
Tue, 04 Aug 2009 17:02:18 +0200 | |
changeset 2679 | 3fa8c0cec760 |
parent 1977 | 606923dff11b |
child 3377 | dd9d292b6a6d |
child 4212 | ab6573088b4a |
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): |
|
14 |
id = '404' |
|
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): |
|
22 |
id = '500' |
|
23 |
||
24 |
def call(self): |
|
25 |
_ = self.req._ |
|
26 |
self.w(u"<h1>%s</h1>" % |
|
27 |
_('an error occured, the request cannot be fulfilled')) |