This commit is contained in:
James Turk 2021-06-05 01:35:56 -04:00
parent 5a0b666e65
commit 86348fc54e
2 changed files with 6 additions and 1 deletions

5
app.py
View File

@ -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:

View File

@ -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

1 id first last position status children hired
14 23 John Grim Actuary Married 1.8 9/9/1970
15 24 John Guardian Optical Systems Engineer Single 0 6/9/1980
16 25 John Icicle Boy Refrigeration R&D Single 0 2/6/1939
17 26 404 John Jones Government Relations Married 3 8/15/1984
18 27 John Joseph Government Relations Married 2 10/31/1938
19 28 John Kim Chi Craft Services Married 2 7/24/1990
20 29 John Lee Accounting Single 0 12/14/1988