def handle500(request): """A 500 message that looks nicer than the normal Apache error page.""" if(is_mobile_request(request)): template = 'spark/handlers/mobile/500.html' else: template = 'spark/handlers/desktop/500.html' return jingo.render(request, template, status=500)
def handle404(request): """A handler for 404s.""" if(is_mobile_request(request)): template = 'spark/handlers/mobile/404.html' else: template = 'spark/handlers/desktop/404.html' return jingo.render(request, template, status=404)
def handle403(request): """A 403 message that looks nicer than the normal Apache forbidden page.""" if(is_mobile_request(request)): template = 'spark/handlers/mobile/403.html' else: template = 'spark/handlers/desktop/403.html' return jingo.render(request, template, status=403)
def handle500(request): """A 500 message that looks nicer than the normal Apache error page.""" if (is_mobile_request(request)): template = 'spark/handlers/mobile/500.html' else: template = 'spark/handlers/desktop/500.html' return jingo.render(request, template, status=500)
def handle404(request): """A handler for 404s.""" if (is_mobile_request(request)): template = 'spark/handlers/mobile/404.html' else: template = 'spark/handlers/desktop/404.html' return jingo.render(request, template, status=404)
def handle403(request): """A 403 message that looks nicer than the normal Apache forbidden page.""" if (is_mobile_request(request)): template = 'spark/handlers/mobile/403.html' else: template = 'spark/handlers/desktop/403.html' return jingo.render(request, template, status=403)