Skip to content

Commit

Permalink
Blank main page.
Browse files Browse the repository at this point in the history
  • Loading branch information
thewchan committed Jun 25, 2020
1 parent fab7c36 commit 45350d2
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 16 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ htmlcov/

dist/
build/
*.egg-info/
*.egg-info/

sandbox/
22 changes: 18 additions & 4 deletions app.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
"""Display a stock ticker visualization based on user input."""
from flask import Flask, render_template, request, redirect


app = Flask(__name__)

@app.route('/')

@app.route('/', methods=('GET', 'POST'))
def index():
return render_template('index.html')
"""Render the app's main page."""
if request.method == 'GET':
# Default gives IBM's ticker when first loaded.
symbol = 'IBM'
return render_template('index.html', symbol=symbol)

else:
# User submitted a ticker symbol aka method = 'POST'
symbol = request.form['symbol']
return render_template('index.html', symbol=symbol)


@app.route('/about')
def about():
return render_template('about.html')
return render_template('about.html')


if __name__ == '__main__':
app.run(port=33507)
app.run(port=33507)
2 changes: 1 addition & 1 deletion templates/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="author" content="@gotoariel">
<!-- <link rel="icon" href="favicon.ico"> -->

<title>Wilkommen, bienvenue, and welcome to Heroku!</title>
<title>A simple stock price time series visualizer</title>

<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
Expand Down
18 changes: 8 additions & 10 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="author" content="@gotoariel">
<!-- <link rel="icon" href="favicon.ico"> -->

<title>Wilkommen, bienvenue, and welcome to Heroku!</title>
<title>A simple stock price time series visualizer</title>

<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
Expand All @@ -16,20 +16,18 @@
<div class="container">
<div class="row">
<div class="col-lg-12 text-left">
<h2>Hello, World!</h2>
<ul>
<li><a href="/about">About</a></li>
<li><a target="_blank" href="https://www.heroku.com/">Heroku</a></li>
<li><a target="_blank" href="http://flask.pocoo.org/">Flask</a></li>
<li><a target="_blank" href="http://jinja.pocoo.org/docs/2.9/">Jinja2</a></li>
<li><a target="_blank" href="http://getbootstrap.com/">Bootstrap</a></li>
</ul>
<h2>A Simple Stock Price Visualizer</h2>
<form>
<label for="symbol">Stock ticker symbol:</label>
<input type="text" id="symbol" name="symbol">
<input type="submit" value="Submit">
</form>
</div>
</div>
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<!-- Placed at the A simple stock price time series visualizerend of the document so the pages load faster -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</body>
Expand Down
Binary file removed testing.txt
Binary file not shown.

0 comments on commit 45350d2

Please sign in to comment.