Skip to content

Commit

Permalink
Merge pull request #14 from nnhphong/taemin
Browse files Browse the repository at this point in the history
Returned html string
  • Loading branch information
taeminlee0601 authored Mar 14, 2024
2 parents d902f3f + 96e3b9b commit 2de0c9c
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion Question1.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,22 @@ def welcome(username):
username = username.upper()
else:
username = tmp
return f'Welcome, {username}, to my CSCB20 Website'

html_string = f"""
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Question 1</title>
</head>
<body>
<h1>Welcome, {username} to my CSCB20 website!</h1>
</body>
</html>
"""

return render_template_string(html_string)

if __name__ == "__main__":
app.run(debug = True)

0 comments on commit 2de0c9c

Please sign in to comment.