Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenneth Philp authored and Kenneth Philp committed Dec 24, 2024
0 parents commit 26bfa70
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
22 changes: 22 additions & 0 deletions server.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from flask import Flask, render_template
import random
import datetime as dt


app = Flask(__name__)


@app.route('/')
def home():

currentDate=dt.datetime.today()

print(f"The current US date is {currentDate.strftime("%x")}")

formattedDate= currentDate.strftime("%x")

print("The date is " + formattedDate)
return render_template("index.html", displayDate = formattedDate)

if __name__=="__main__":
app.run(debug=True)
18 changes: 18 additions & 0 deletions templates/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE HTML>
<!--
Paradigm Shift by HTML5 UP
html5up.net | @ajlkn
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
-->
<html>
<head>
<title>Kenny's Home Page</title>
</head>
<body>

<h1>Hello world</h1>
<h1>{{displayDate}}</h1>


</body>
</html>

0 comments on commit 26bfa70

Please sign in to comment.