Advertisement
Guest User

Untitled

a guest
Aug 16th, 2024
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 1.74 KB | None | 0 0
  1. {% extends "layout.html" %}
  2.  
  3. {% block title %}
  4.     Home
  5. {% endblock %}
  6.  
  7. {% block main %}
  8.     <h2>User currently logged in: {{ username }}</h2>
  9.     <h2>UTC time now: {{ time }}</h2>
  10.     {% if info %}
  11.         <div class="table-container">
  12.             <table>
  13.                 <thead>
  14.                     <tr>
  15.                         <th>Symbol</th>
  16.                         <th>Number of shares</th>
  17.                         <th>Current price</th>
  18.                         <th>Total Value</th>
  19.                     </tr>
  20.                 </thead>
  21.                 <tbody>
  22.                     {% for transaction in info %}
  23.                         <tr>
  24.                             <td>{{ transaction["symbol"] }}</td>
  25.                             <td>{{ transaction["total_shares"]}}</td>
  26.                             <td>{{ transaction["price"] | usd}}</td>
  27.                             <td>{{ transaction["total_value"] | usd}}</td>
  28.                         </tr>
  29.                     {% endfor %}
  30.                 </tbody>
  31.             </table>
  32.         </div>
  33.     {% endif %}
  34.     <div class="table-container">
  35.         <table>
  36.             <tbody>
  37.                 <tr>
  38.                     <td><b>Cash Available</b></td>
  39.                     <td>{{ cash_avail | usd}}</td>
  40.                 </tr>
  41.                 <tr>
  42.                     <td><b>Grand total</b></td>
  43.                     <td>{{ grand_total | usd}}</td>
  44.                 </tr>
  45.             </tbody>
  46.         </table>
  47.     </div>
  48.     <form action="/" method="post">
  49.         <input type="number" name="money" min="0" max="1000000" placeholder="Enter amount">
  50.         <button class="btn btn-primary" type="submit" name="button" value="add-money">Add money</button>
  51.     </form>
  52. {% endblock %}
  53.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement