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