Browse Source

use reverse method instead of sort

master
Mohamad Safadieh 4 months ago
parent
commit
73a56685e9
Signed by: mhmd GPG Key ID: 2F3FDF2EAE1E3C36
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      guineapigs/templates/dashboard.html

+ 2
- 2
guineapigs/templates/dashboard.html View File

@@ -14,13 +14,13 @@

<div class="card border-secondary bg-light my-3">
<div class="card-header d-flex justify-content-between align-items-center">
<h5>food entries</h5>
<h5>food today</h5>
<form class="modal-form" action="/food_entry/add">
<button class="btn btn-secondary modal-btn" type="button">&plus; add</button>
</form>
</div>
<div class="list-group-flush card-body">
{% for entry in food_entries|sort(reverse=True) %}
{% for entry in food_entries|reverse %}
<div class="list-group-item bg-light d-flex w-100 justify-content-between px-0">
<div class="w-100">
<div class="d-flex w-100 justify-content-between">


Loading…
Cancel
Save