Fix date ordering
This commit is contained in:
		
							parent
							
								
									676602e038
								
							
						
					
					
						commit
						c4165e3801
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -30,7 +30,7 @@ class HomePage(CreateView):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        context['detailform'] = DetailForm()
 | 
					        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['tapperlist'] = [x.name for x in Tapper.objects.all()]
 | 
				
			||||||
        context['tappersdata'] = {}
 | 
					        context['tappersdata'] = {}
 | 
				
			||||||
        current_counts = {tapper.name: 0 for tapper in Tapper.objects.all()}
 | 
					        current_counts = {tapper.name: 0 for tapper in Tapper.objects.all()}
 | 
				
			||||||
| 
						 | 
					@ -60,7 +60,7 @@ class DetailPage(FormView):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        context['detailform'] = form
 | 
					        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['tapperlist'] = [x.name for x in Tapper.objects.all()]
 | 
				
			||||||
        context['tappersdata'] = {}
 | 
					        context['tappersdata'] = {}
 | 
				
			||||||
        current_counts = {tapper.name: 0 for tapper in Tapper.objects.all()}
 | 
					        current_counts = {tapper.name: 0 for tapper in Tapper.objects.all()}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue