Fix graph layout
This commit is contained in:
		
							parent
							
								
									504a9f6515
								
							
						
					
					
						commit
						93cb146eb3
					
				
					 3 changed files with 14 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -32,6 +32,7 @@ class HomePage(CreateView):
 | 
			
		|||
 | 
			
		||||
        dates = Kwijtgeraakt.objects.all().order_by('date')
 | 
			
		||||
        context['tapperlist'] = [x.name for x in Tapper.objects.all()]
 | 
			
		||||
        context['datelist'] = [x.date.strftime("%Y-%m-%d") for x in dates]
 | 
			
		||||
        context['tappersdata'] = {}
 | 
			
		||||
        current_counts = {tapper.name: 0 for tapper in Tapper.objects.all()}
 | 
			
		||||
        for date in dates:
 | 
			
		||||
| 
						 | 
				
			
			@ -59,9 +60,12 @@ class DetailPage(FormView):
 | 
			
		|||
        context['tappers'] = Tapper.objects.all().annotate(amount=Count('kwijtgeraakt'))
 | 
			
		||||
 | 
			
		||||
        context['detailform'] = form
 | 
			
		||||
        context['start_date'] = form.cleaned_data['start_date']
 | 
			
		||||
        context['end_date'] = form.cleaned_data['end_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['datelist'] = [x.date.strftime("%Y-%m-%d") for x in dates]
 | 
			
		||||
        context['tappersdata'] = {}
 | 
			
		||||
        current_counts = {tapper.name: 0 for tapper in Tapper.objects.all()}
 | 
			
		||||
        for date in dates:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue