Skip to content

Commit

Permalink
Updated application.py to fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jhustles committed Oct 7, 2020
1 parent 01ce90b commit fafe200
Show file tree
Hide file tree
Showing 30 changed files with 286 additions and 188 deletions.
Binary file modified .DS_Store
Binary file not shown.
381 changes: 206 additions & 175 deletions application.py

Large diffs are not rendered by default.

Binary file modified finance.db
Binary file not shown.
Binary file added readme_pics/.DS_Store
Binary file not shown.
Binary file added readme_pics/0_about.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readme_pics/1_login.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readme_pics/2_registration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readme_pics/2a_complete.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readme_pics/3_signedin_empty.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readme_pics/4_quotebuy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readme_pics/4a_searchResult.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readme_pics/4b_buyEstimateResult.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readme_pics/4c_confirmation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readme_pics/error_prevention_buyEstimate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readme_pics/finance_db_ERD.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readme_pics/history.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readme_pics/portfolio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readme_pics/portfolioAfterSale.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readme_pics/sellConfirmation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readme_pics/sellError_no_input.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readme_pics/sellError_quantity.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readme_pics/sellError_symbol.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readme_pics/sellEstimate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ h1, h2, h3, h4, h5, h6 {
}

#main {
/* margin-top: 50px; */
padding: 3%;
padding-bottom: 0%;
}

@media (max-width: 992px) {
Expand Down Expand Up @@ -415,7 +415,7 @@ h1, h2, h3, h4, h5, h6 {

#hero {
width: 100%;
height: 96vh;
height: 96.5vh;
/* padding-top: 8%; */
/* padding-bottom: 8%; */
background: url("../img/hero-bg.jpg") top right;
Expand Down
22 changes: 22 additions & 0 deletions templates/about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{% extends "layout.html" %}
{% block main %}

<div>
<div>
<h1 style="color: deeppink;">About BloomsTrade</h1>
</div>
<div>
<p style="color: white; font-size: 15pt;font-weight: 400;">
This project is inspired by my passion for stock trading and coding. This is a Python web application using
Flask, Werkzeug exceptions and security, SQLite3, Requests, Jinja, Bootstrap4, Javascript, HTML5, and CSS3.
</p>
</div>




</div>



{% endblock %}
46 changes: 46 additions & 0 deletions templates/empty.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{% extends "layout.html" %}
{% block main %}
<div class="bg-light">
<div class="d-flex justify-content-between" style="margin-bottom: 1%;">
<div>
<h2 style="color: black;">Account: {{ username }}</h2>
</div>
<div>
<h2 style="color: deeppink;">Investments | Cash Balance: {{ availableCash }}</h3>
</div>
<div>
<h2>{{ current_datetime }}</h2>
</div>
</div>
<div>
<table class="table table-bordered table-hover table-responsive-sm">
<thead>
<tr>
<th scope="col">Symbol</th>
<th scope="col">Company</th>
<th scope="col">Shares</th>
<th scope="col">Cost Basis</th>
<th scope="col">Market Value (USD)</th>
<!-- <th scope="col">Unrealized Gain Or Loss</th> -->
</tr>
</thead>
<tbody>
{% for item in items %}
<tr>
<td>{{ item.symbol }}</td>
<td>{{ item.name }}</td>
<td>{{ item.shares }}</td>
<td>{{ item.costBasis }}</td>
<td>{{ item.marketValue }}</td>
<!-- <td>{{ item.gainLoss }}</td> -->
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<!-- Message: -->
<div class="d-flex justify-content-center" style="color: red;">
<h5 class="bg-light">{{ message }}</h5>

{% endblock %}
6 changes: 4 additions & 2 deletions templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
<link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
<!-- Boxicons -->
<link href='https://unpkg.com/boxicons@2.0.5/css/boxicons.min.css' rel='stylesheet'>
<script type="module" src="https://unpkg.com/ionicons@5.1.2/dist/ionicons/ionicons.esm.js"></script>
<script nomodule="" src="https://unpkg.com/ionicons@5.1.2/dist/ionicons/ionicons.js"></script>
<!-- Template Main CSS File -->
<link href="static/css/style.css" rel="stylesheet">
</head>
Expand All @@ -34,11 +36,13 @@ <h1 class="logo d-flex align-items-center"><a href="/">Bloom$-Trade</a></h1>
<li class="nav-item"><a class="nav-link" href="/sellEstimator">Sell</a></li>
<li class="nav-item"><a class="nav-link" href="/history">History</a></li>
<li class="nav-item"><a class="nav-link" href="/logout">Log Out</a></li>
<li class="nav-item"><a class="nav-link" href="/about">About</a></li>
</ul>
{% else %}
<ul class="navbar-nav flex-row justify-content-end mr-auto mt-2" style=margin-right:8px;>
<li class="nav-item"><a class="nav-link" href="/register">Register</a></li>
<li class="nav-item"><a class="nav-link" href="/login">Log In</a></li>
<li class="nav-item"><a class="nav-link" href="/about">About</a></li>
</ul>
{% endif %}
</nav><!-- .nav-menu -->
Expand Down Expand Up @@ -87,8 +91,6 @@ <h1 class="logo d-flex align-items-center"><a href="/">Bloom$-Trade</a></h1>
<script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
<!-- Template Main JS File -->
<script src="static/js/main.js"></script>
<script src="https://unpkg.com/ionicons@5.1.2/dist/ionicons.js"></script>
<!-- boxicons -->
</body>
</html>

Expand Down
4 changes: 2 additions & 2 deletions templates/quote1.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

{% block main %}

<div>
<!-- <div>
{{ currentSearchHistory }}
{{ searchCounter }}
</div>
</div> -->
<div class="tickerSearchBar" style="padding-top: 3%;">
<form action="/quote" method="POST">
<div class="form-group d-inline-flex flex-direction-row">
Expand Down
6 changes: 3 additions & 3 deletions templates/register.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ <h3 style="color: white;">{{ message }}</h3>
<form action="/register" method="POST">
<h3 style="text-align: center; padding: 3pc; ">Account Registration Form</h3>
<div class="form-group">
<input type="text" style="margin-bottom: 2pt;" placeholder="First Name" name="firstName" class="form-control" required>
<input type="text" style="margin-bottom: 10pt;" placeholder="First Name" name="firstName" class="form-control" required>
<input type="text" placeholder="Last Name" name=lastName class="form-control" required>
</div>
<div class="form-wrapper flex-direction-row">
Expand All @@ -22,14 +22,14 @@ <h3 style="text-align: center; padding: 3pc; ">Account Registration Form</h3>
<input type="password" placeholder="Password" name="password" class="form-control"required>
<i class='bx bx-lock' ></i>
</div>
<div class="form-wrapper">
<div class="form-wrapper" style="padding-bottom: 3px;">
<input type="password" placeholder="Confirm Password" name="passwordConfirm" class="form-control"required>
<i class='bx bx-lock' ></i>
</div>
<button type="submit">Register
<i class='bx bxs-arrow-to-right' ></i>
</button>
<div class="form-group" style="size: 80pc;"></div>
<div class="form-group" style="size: 80pc;">
<label for="member">Already Have An Account?</label>
<a href="/login.html" style="padding-bottom: 3pc;">Proceed to Login page</a>
</div>
Expand Down
5 changes: 1 addition & 4 deletions templates/sell.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@ <h5 class="bg-light">{{ message }}</h5>
<tr>
<th scope="col"><label for="sellSymbol">Order Type:</label></th>
<th scope="col"><label for="sellSymbol">Sell</label></th>
<th><label for="sellSymbol">Curr. Ticker: </label></th>
<th scope="col">
<input type="text" class="form-control" style="width: 50%;" name="sellSymbol" id="sellSymbol" placeholder="Symbol" onkeyup="this.value = this.value.toUpperCase()">
</th>
<th><label for="sellSymbol"><input type="text" class="form-control" style="width: 75%;" name="sellSymbol" id="sellSymbol" placeholder="Enter Symbol" onkeyup="this.value = this.value.toUpperCase()"> </label></th>
</tr>
</thead>
<div class="form-group">
Expand Down

0 comments on commit fafe200

Please sign in to comment.