Fix date ordering
This commit is contained in:
parent
676602e038
commit
c4165e3801
|
@ -30,7 +30,7 @@ class HomePage(CreateView):
|
|||
|
||||
context['detailform'] = DetailForm()
|
||||
|
||||
dates = Kwijtgeraakt.objects.all().order_by('date')
|
||||
dates = Kwijtgeraakt.objects.all().order_by('-date')
|
||||
context['tapperlist'] = [x.name for x in Tapper.objects.all()]
|
||||
context['tappersdata'] = {}
|
||||
current_counts = {tapper.name: 0 for tapper in Tapper.objects.all()}
|
||||
|
@ -60,7 +60,7 @@ class DetailPage(FormView):
|
|||
|
||||
context['detailform'] = form
|
||||
|
||||
dates = Kwijtgeraakt.objects.filter(date__gte=form.cleaned_data['start_date'], date__lte=form.cleaned_data['end_date']).order_by('date')
|
||||
dates = Kwijtgeraakt.objects.filter(date__gte=form.cleaned_data['start_date'], date__lte=form.cleaned_data['end_date']).order_by('-date')
|
||||
context['tapperlist'] = [x.name for x in Tapper.objects.all()]
|
||||
context['tappersdata'] = {}
|
||||
current_counts = {tapper.name: 0 for tapper in Tapper.objects.all()}
|
||||
|
|
Loading…
Reference in a new issue