404
This commit is contained in:
parent
5a0b666e65
commit
86348fc54e
5
app.py
5
app.py
@ -47,6 +47,11 @@ def staff():
|
||||
|
||||
@app.route("/staff/<id_>")
|
||||
def staff_detail(id_):
|
||||
if id_ == "404":
|
||||
abort(
|
||||
404,
|
||||
"This page intentionally left blank. (No really! This is an intentional error for demonstration purposes.)",
|
||||
)
|
||||
if employee := employees().get(id_):
|
||||
return render_template("staff_detail.html", employee=employee)
|
||||
else:
|
||||
|
@ -14,7 +14,7 @@ id,first,last,position,status,children,hired
|
||||
23,John,Grim,Actuary,Married,1.8,9/9/1970
|
||||
24,John,Guardian,Optical Systems Engineer,Single,0,6/9/1980
|
||||
25,John,Icicle Boy,Refrigeration R&D,Single,0,2/6/1939
|
||||
26,John,Jones,Government Relations,Married,3,8/15/1984
|
||||
404,John,Jones,Government Relations,Married,3,8/15/1984
|
||||
27,John,Joseph,Government Relations,Married,2,10/31/1938
|
||||
28,John,Kim Chi,Craft Services,Married,2,7/24/1990
|
||||
29,John,Lee,Accounting,Single,0,12/14/1988
|
||||
|
|
Loading…
Reference in New Issue
Block a user