Skip to content

Commit 6f519bf

Browse files
authored
Add files via upload
1 parent 9b7ec85 commit 6f519bf

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

Flask Projects/app.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
from flask import Flask, render_template, url_for
2+
app = Flask(__name__)
3+
4+
posts = [
5+
{
6+
'author': 'Aadit',
7+
'title': 'Blog Post 1',
8+
'content': 'Deep learning in toward data science',
9+
'date_posted': 'April 20, 2018'
10+
},
11+
{
12+
'author': 'Shukla',
13+
'title': 'Blog Post 2',
14+
'content': 'Balanced and Imbalanced Dataset',
15+
'date_posted': 'April 21, 2018'
16+
}
17+
]
18+
19+
20+
@app.route("/")
21+
@app.route("/home")
22+
def home():
23+
return render_template('home.html', posts=posts)
24+
25+
26+
@app.route("/about")
27+
def about():
28+
return render_template('about.html', title='About')
29+
30+
31+
if __name__ == '__main__':
32+
app.run(debug=True)

0 commit comments

Comments
 (0)