Ejemplo n.º 1
0
 def page_not_found(error):
     if request.is_xhr:
         return jsonify(error=_('Sorry,page not found'))
     return render_template("errors/404.html",error=error)
Ejemplo n.º 2
0
 def server_error(error):
     if request.is_xhr:
         return jsonify(error=_('Sorry,an error has occurred'))
     return render_template("errors/500.html",error=error)
Ejemplo n.º 3
0
 def forbidden(error):
     if request.is_xhr:
         return jsonify(error=_('Sorry,page not allowed'))
     return render_template("errors/403.html",error=error)