File tree Expand file tree Collapse file tree 11 files changed +114
-0
lines changed
Expand file tree Collapse file tree 11 files changed +114
-0
lines changed Original file line number Diff line number Diff line change 1+ desktop.ini
Original file line number Diff line number Diff line change 1+ web : gunicorn index:app
Original file line number Diff line number Diff line change 1+ from flask import Flask , render_template
2+
3+ app = Flask (__name__ )
4+
5+ # Creating simple Routes
6+ @app .route ('/test' )
7+ def test ():
8+ return "Home Page"
9+
10+ @app .route ('/test/about/' )
11+ def about_test ():
12+ return "About Page"
13+
14+ # Routes to Render Something
15+ @app .route ('/' )
16+ def home ():
17+ return render_template ("home.html" )
18+
19+ @app .route ('/about' , strict_slashes = False )
20+ def about ():
21+ return render_template ("about.html" )
22+
23+ # Make sure this we are executing this file
24+ if __name__ == '__main__' :
25+ app .run (debug = True )
Original file line number Diff line number Diff line change 1+ Website Python
2+
3+ * Backend Python-Flask
4+
5+ [ Code] ( ./index.py )
Original file line number Diff line number Diff line change 1+ Click == 7.0
2+ Flask == 1.0.2
3+ gunicorn == 19.9.0
4+ itsdangerous == 1.1.0
5+ Jinja2 == 2.10
6+ MarkupSafe == 1.1.0
7+ Werkzeug == 0.14.1
Original file line number Diff line number Diff line change 1+ python-3.9.0
Original file line number Diff line number Diff line change 1+ body {
2+ background : # 000 ;
3+ }
Original file line number Diff line number Diff line change 1+ console . log ( 'Hello World' ) ;
Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ {% extends "layout.html" %}
3+
4+ {% block title %}About{% endblock %}
5+
6+ {% block content %}
7+
8+ < div class ="jumbotron ">
9+ < h1 class ="display-4 "> About</ h1 >
10+ < p class ="lead "> This is a simple site | zzJust_Mezz</ p >
11+ < hr class ="my-4 ">
12+ < p > click here</ p >
13+ < a class ="btn btn-primary btn-lg " href ="# " role ="button "> Learn more</ a >
14+ </ div >
15+
16+ {% endblock%}
Original file line number Diff line number Diff line change 1+ {% extends "layout.html" %}
2+
3+ {% block title %}Home{% endblock %}
4+
5+ {% block content %}
6+
7+ < div class ="jumbotron ">
8+ < h1 class ="display-4 "> Hello, world!!</ h1 >
9+ < p class ="lead "> This is a simple site | zzJust_Mezz</ p >
10+ < hr class ="my-4 ">
11+ < p > click here</ p >
12+ < a class ="btn btn-primary btn-lg " href ="# " role ="button "> Learn more</ a >
13+ </ div >
14+
15+ {% endblock%}
You can’t perform that action at this time.
0 commit comments