We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9b7ec85 commit 6f519bfCopy full SHA for 6f519bf
1 file changed
Flask Projects/app.py
@@ -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