add column created and put order descendent from created field
This commit is contained in:
parent
cba3bca8cf
commit
fee1d6787c
|
@ -23,7 +23,9 @@ class TagListView(View):
|
|||
|
||||
def dispatch_request(self):
|
||||
lots = Lot.query.filter(Lot.owner_id == current_user.id)
|
||||
tags = Tag.query.filter(Tag.owner_id == current_user.id).order_by(Tag.id)
|
||||
tags = Tag.query.filter(Tag.owner_id == current_user.id).order_by(
|
||||
Tag.created.desc()
|
||||
)
|
||||
context = {
|
||||
'lots': lots,
|
||||
'tags': tags,
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
<th scope="col">Type</th>
|
||||
<th scope="col">Provider</th>
|
||||
<th scope="col">Device</th>
|
||||
<th scope="col">Created</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -62,6 +63,7 @@
|
|||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ tag.created.strftime('%H:%M %d-%m-%Y') }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
|
Reference in New Issue