-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4b80475
commit c5e5e26
Showing
4 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
# flask-part-1 | ||
Assignment #2 | ||
|
||
# GCP deployment link: | ||
|
||
|
||
# Azure deployment link: |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# the below imports the Flask object from the flask package | ||
from flask import Flask | ||
|
||
# creating the Flask application instance and give it the name app | ||
app = Flask(__name__) | ||
|
||
# the decorator, @app.route, is being told with '/' that the function will respond to web requests for the URL '/' | ||
|
||
|
||
@app.route('/') | ||
# creates the 'index' page and the ability to navigate between pages | ||
@app.route('/index/') | ||
# creates the 'hello' function and then runs the phrase 'Hello, World!' through it | ||
def hello(): | ||
return '<h1>Hello, World!</h1>' | ||
|
||
# creates an 'about' page and function and runs the phrase through it | ||
|
||
|
||
@app.route('/about/') | ||
def about(): | ||
return '<h3>This is a Flask web application made by Caroline Sanicola.</h3>' | ||
|
||
# creates a 'contact' page and function and runs the phrase through it | ||
|
||
|
||
@app.route('/contact/') | ||
def contact(): | ||
return '<h3>If you would like to contact us, please don\'t.</h3>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|