Skip to content

Commit

Permalink
Added error pages
Browse files Browse the repository at this point in the history
  • Loading branch information
priyankamandikal committed Aug 3, 2016
1 parent ac5570d commit 899c689
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app.py
Expand Up @@ -327,9 +327,13 @@ def inspect():
def help():
return render_template('help.html') # displays links to help docs for each end-point

#@app.errorhandler(404)
#def not_found(error):
# return render_template('error.html'), 404
@app.errorhandler(404)
def page_not_found(error):
return render_template('404.html'), 404

@app.errorhandler(500)
def page_not_found(error):
return render_template('500.html'), 500

# No cache
@app.after_request
Expand Down
7 changes: 7 additions & 0 deletions templates/404.html
@@ -0,0 +1,7 @@
{% extends "layout.html" %}
{% block title %}AROWF - Page Not Found{% endblock %}
{% block page_content %}
<div class="page-header">
<h1>Not Found</h1>
</div>
{% endblock %}
7 changes: 7 additions & 0 deletions templates/500.html
@@ -0,0 +1,7 @@
{% extends "layout.html" %}
{% block title %}AROWF - Internal Server Error{% endblock %}
{% block page_content %}
<div class="page-header">
<h1>Internal Server Error</h1>
</div>
{% endblock %}

0 comments on commit 899c689

Please sign in to comment.