Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {% extends "layout.html" %}
- {% block title %}
- Portfolio
- {% endblock %}
- {% block main %}
- <table class="table table-striped">
- <thead>
- <tr>
- <th>Symbol</th>
- <th>Name</th>
- <th>Shares</th>
- <th>Price</th>
- <th>TOTAL</th>
- </tr>
- </thead>
- <tfoot>
- <tr>
- <td colspan="4"></td>
- <td><b>{{ grand_total|usd }}</b></td>
- </tr>
- </tfoot>
- <tbody>
- {% for key in stock_names_dict %}
- {% if no_of_shares_dict.get(key) == 0 %}
- <tr>
- <td>{{ key|e }}</td>
- <td>{{ stock_names_dict.get(key)|e }}</td>
- <td>{{ no_of_shares_dict.get(key)|e }}</td>
- <td>{{ current_price_dict.get(key)|e }}</td>
- <td>{{ (current_price_dict.get(key) * no_of_shares_dict.get(key))|e }}</td>
- </tr>
- {% else %}
- <tr>
- <td>{{ key }}</td>
- <td>{{ stock_names_dict.get(key) }}</td>
- <td>{{ no_of_shares_dict.get(key) }}</td>
- <td>{{ current_price_dict.get(key)|usd }}</td>
- <td>{{ (current_price_dict.get(key) * no_of_shares_dict.get(key))|usd }}</td>
- </tr>
- {% endif %}
- {% endfor %}
- <tr>
- <td colspan="4">CASH</td>
- {% for i in users_info %}
- <td>{{ i.cash|usd }}</td>
- {% endfor %}
- </tr>
- </tbody>
- </table>
- {% endblock %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement