web/views/error.py
changeset 3377 dd9d292b6a6d
parent 1977 606923dff11b
child 3451 6b46d73823f5
equal deleted inserted replaced
3376:f5c69485381f 3377:dd9d292b6a6d
     9 __docformat__ = "restructuredtext en"
     9 __docformat__ = "restructuredtext en"
    10 
    10 
    11 from cubicweb.view import StartupView
    11 from cubicweb.view import StartupView
    12 
    12 
    13 class FourOhFour(StartupView):
    13 class FourOhFour(StartupView):
    14     id = '404'
    14     __regid__ = '404'
    15 
    15 
    16     def call(self):
    16     def call(self):
    17         _ = self.req._
    17         _ = self.req._
    18         self.w(u"<h1>%s</h1>" % _('this resource does not exist'))
    18         self.w(u"<h1>%s</h1>" % _('this resource does not exist'))
    19 
    19 
    20 
    20 
    21 class ErrorOccured(StartupView):
    21 class ErrorOccured(StartupView):
    22     id = '500'
    22     __regid__ = '500'
    23 
    23 
    24     def call(self):
    24     def call(self):
    25         _ = self.req._
    25         _ = self.req._
    26         self.w(u"<h1>%s</h1>" %
    26         self.w(u"<h1>%s</h1>" %
    27                _('an error occured, the request cannot be fulfilled'))
    27                _('an error occured, the request cannot be fulfilled'))