Fix date ordering

This commit is contained in:
Kevin Alberts 2019-11-12 13:44:45 +01:00
parent 99b2cce4e1
commit 0c864a5ce4
Signed by: Kurocon
GPG key ID: BCD496FEBA0C6BC1

View file

@ -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()}