Implement viewing live and DB information from account
This commit is contained in:
@@ -55,7 +55,7 @@
|
||||
</span>
|
||||
</button>
|
||||
{% if type == 'page' %}
|
||||
<a href="{% url 'trades' type=type account_id=item.id %}"><button
|
||||
<a href="{% url 'account_info' type=type account_id=item.id %}"><button
|
||||
class="button is-success">
|
||||
<span class="icon-text">
|
||||
<span class="icon">
|
||||
@@ -67,7 +67,7 @@
|
||||
{% else %}
|
||||
<button
|
||||
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
|
||||
hx-get="{% url 'trades' type=type account_id=item.id %}"
|
||||
hx-get="{% url 'account_info' type=type account_id=item.id %}"
|
||||
hx-trigger="click"
|
||||
hx-target="#{{ type }}s-here"
|
||||
class="button is-success">
|
||||
|
||||
39
core/templates/window-content/account-info.html
Normal file
39
core/templates/window-content/account-info.html
Normal file
@@ -0,0 +1,39 @@
|
||||
<h1 class="title">Live information</h1>
|
||||
<table class="table is-fullwidth is-hoverable">
|
||||
<thead>
|
||||
<th>attribute</th>
|
||||
<th>value</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for key, item in live_info.items %}
|
||||
<tr>
|
||||
<th>{{ key }}</th>
|
||||
<td>
|
||||
{% if item is not None %}
|
||||
{{ item }}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h1 class="title">Stored information</h1>
|
||||
<table class="table is-fullwidth is-hoverable">
|
||||
<thead>
|
||||
<th>attribute</th>
|
||||
<th>value</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for key, item in db_info.items %}
|
||||
<tr>
|
||||
<th>{{ key }}</th>
|
||||
<td>
|
||||
{% if item is not None %}
|
||||
{{ item }}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
Reference in New Issue
Block a user