Skip to content

Commit

Permalink
Updsted error views
Browse files Browse the repository at this point in the history
  • Loading branch information
ddeveloper72 committed May 2, 2019
1 parent 89873b1 commit c35147d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Linkedin Profile.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
}
],
"settings": {
"python.pythonPath": "C:\\Users\\dunca\\AppData\\Local\\Programs\\Python\\Python36\\python.exe"
"python.pythonPath": "env\\Scripts\\python.exe"
},

}
12 changes: 8 additions & 4 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,22 @@ def about_education(education_name):
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Page not found 404 Views #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

@app.errorhandler(404)
def not_found(e):
def not_found(error):
"""
Inbuilt function which takes error as parameter
"""
return render_template("404.html")
return render_template("404.html"), 404

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Internal Error Views #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

@app.errorhandler(500)
def not_found(e):
def internal_error(error):
"""
Inbuilt function which takes error as parameter
Inbuilt function which takes error as parameter
"""
return render_template("500.html")

Expand Down

0 comments on commit c35147d

Please sign in to comment.