Display results only for the current month

This commit is contained in:
2023-01-15 22:43:07 +01:00
parent 48391ee808
commit ee6fc48c90
2 changed files with 36 additions and 3 deletions

View File

@@ -8,6 +8,11 @@
</head>
<body>
<h1>Prix du m³ de fioul pour Languidic</h1>
<h2 class="row">
<div class="col-3"><a href="{{ prev_page }}">[<]</a></div>
<div class="col-3" style="text-align:center">{{ displayed_month }}</div>
<div class="col-3" style="text-align:right"><a href="{{ next_page }}">[>]</a></div>
</h2>
<table id="results" class="u-full-width">
<tr>
<th colspan="2"></th> <!-- Date -->
@@ -19,7 +24,7 @@
<td>{{current_1000}}</td>
<td>{{current_500}}</td>
</tr>
% for x in results:
% for x in month_results:
<tr class="{{day_classes[x.date.weekday()]}}">
<td>{{x.date.strftime('%A')}}</td>
<td>{{x.date.strftime('%d %b %Y')}}</td>