Remove unnecessary views
This commit is contained in:
parent
12ec74e923
commit
09439dd437
1 changed files with 0 additions and 75 deletions
|
@ -1,28 +1,3 @@
|
|||
# Template for 403 Forbidden
|
||||
def render_403(context)
|
||||
template = <<-HTML
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
body { text-align:center;font-family:helvetica,arial;font-size:22px;
|
||||
color:#888;margin:20px}
|
||||
#c {margin:0 auto;width:500px;text-align:left}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Forbidden</h2>
|
||||
<h3>Kemal doesn't allow you to see this page.</h3>
|
||||
<img src="/__kemal__/404.png">
|
||||
</body>
|
||||
</html>
|
||||
HTML
|
||||
context.response.content_type = "text/html"
|
||||
context.response.status_code = 403
|
||||
context.response.print template
|
||||
context
|
||||
end
|
||||
|
||||
# Template for 404 Not Found
|
||||
def render_404(context)
|
||||
template = <<-HTML
|
||||
|
@ -79,53 +54,3 @@ def render_500(context, backtrace, verbosity)
|
|||
context.response.print template
|
||||
context
|
||||
end
|
||||
|
||||
# Template for 415 Unsupported media type
|
||||
def render_415(context, message)
|
||||
template = <<-HTML
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
body { text-align:center;font-family:helvetica,arial;font-size:22px;
|
||||
color:#888;margin:20px}
|
||||
#c {margin:0 auto;width:500px;text-align:left}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Unsupported media type</h2>
|
||||
<h3>#{message}</h3>
|
||||
<img src="/__kemal__/404.png">
|
||||
</body>
|
||||
</html>
|
||||
HTML
|
||||
context.response.content_type = "text/html"
|
||||
context.response.status_code = 415
|
||||
context.response.print template
|
||||
context
|
||||
end
|
||||
|
||||
# Template for 400 Bad request
|
||||
def render_400(context, message)
|
||||
template = <<-HTML
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
body { text-align:center;font-family:helvetica,arial;font-size:22px;
|
||||
color:#888;margin:20px}
|
||||
#c {margin:0 auto;width:500px;text-align:left}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Bad request</h2>
|
||||
<h3>#{message}</h3>
|
||||
<img src="/__kemal__/404.png">
|
||||
</body>
|
||||
</html>
|
||||
HTML
|
||||
context.response.content_type = "text/html"
|
||||
context.response.status_code = 400
|
||||
context.response.print template
|
||||
context
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue