File tree Expand file tree Collapse file tree 7 files changed +79
-0
lines changed
ClassExamples/PJ128_AIML6m_Jan21/flask Expand file tree Collapse file tree 7 files changed +79
-0
lines changed Original file line number Diff line number Diff line change 1+ from flask import Flask
2+
3+ app = Flask (__name__ )
4+
5+ @app .route ('/' )
6+ def hello_world ():
7+ return 'Hello, my dear AIML World !'
8+
9+ if __name__ == '__main__' :
10+ app .run ()
Original file line number Diff line number Diff line change 1+ from flask import Flask
2+
3+ app = Flask (__name__ )
4+
5+ @app .route ('/' )
6+ def hello_world ():
7+ return 'Hello, my dear AIML World !'
8+
9+ if __name__ == '__main__' :
10+ app .run ()
Original file line number Diff line number Diff line change 1+ from flask import Flask
2+
3+ app = Flask (__name__ )
4+
5+ @app .route ('/' )
6+ def myroot ():
7+ return 'Hello, I am at root / '
8+
9+ @app .route ('/home' )
10+ @app .route ('/myhome' )
11+ def myhome ():
12+ return 'I am at Home'
13+
14+ if __name__ == '__main__' :
15+ app .run ()
Original file line number Diff line number Diff line change 1+ from flask import Flask
2+
3+ app = Flask (__name__ )
4+
5+ @app .route ('/' )
6+ def hello_world ():
7+ return 'Hello, my dear AIML World !'
8+
9+ @app .route ('/home/<name>' )
10+ def home (name ):
11+ return "hello, " + name ;
12+
13+ if __name__ == '__main__' :
14+ app .run ()
Original file line number Diff line number Diff line change 1+ from flask import *
2+
3+ app = Flask (__name__ )
4+
5+ @app .route ('/' )
6+ def hello_world ():
7+ return render_template ('first.html' )
8+
9+ @app .route ('/wel' )
10+ def home ():
11+ return render_template ('welcome.html' )
12+
13+ if __name__ == '__main__' :
14+ app .run ()
Original file line number Diff line number Diff line change 1+ < html >
2+ < body bgcolor =cyan >
3+ < h1 > First page </ h1 >
4+ < hr >
5+ Jump to < a href =wel > welcome </ a > page
6+
7+ </ body >
8+ </ html >
Original file line number Diff line number Diff line change 1+ < html >
2+ < body bgcolor =yellow >
3+ < h1 > Welcome AIML Champs </ h1 >
4+ < hr >
5+ @written in flask
6+ < a href =/ > back to home </ a >
7+ </ body >
8+ </ html >
You can’t perform that action at this time.
0 commit comments