|
@@ -9,6 +9,22 @@ app=Flask(__name__)
|
|
|
def index():
|
|
|
return render_template('index.html')
|
|
|
|
|
|
-@app.route('/hello/<user>')
|
|
|
-def hello(user):
|
|
|
- return render_template('hello.html',user=user)
|
|
|
+@app.route('/filter')
|
|
|
+def test_filter():
|
|
|
+ return render_template('filter.html',words='<h1>hello filter!</h1>')
|
|
|
+
|
|
|
+@app.route('/age/<int:myage>')
|
|
|
+def age(myage):
|
|
|
+ return render_template('age.html',myage=myage)
|
|
|
+
|
|
|
+@app.route('/for')
|
|
|
+def for_return():
|
|
|
+ fruits=['apple','orange','watermelon']
|
|
|
+ profile1={'id':1,'name':'Felix','sex':'male','height':'178cm','weight':'74kg'}
|
|
|
+ profile2={'id':2,'name':'Lily','sex':'female','height':'169cm','weight':'50kg'}
|
|
|
+ profiles=[profile1,profile2]
|
|
|
+ return render_template('for.html',fruits=fruits,profiles=profiles)
|
|
|
+
|
|
|
+@app.route('/tags')
|
|
|
+def tags():
|
|
|
+ return render_template('tags.html')
|