#63 Replacing vote expiration with vote accuarcy
This commit is contained in:
		@@ -74,7 +74,8 @@ class PlaceDetailView(IsAuthenticatedMixin, IsEligibleToSeePlaceMixin, View):
 | 
			
		||||
            },
 | 
			
		||||
            'placevoting': {
 | 
			
		||||
                'users_vote': PlaceVoting.objects.filter(place=place, submitted_by=explorer).first(),
 | 
			
		||||
                'all_choices': reversed(PLACE_LEVELS)
 | 
			
		||||
                'all_choices': reversed(PLACE_LEVELS),
 | 
			
		||||
                'accuracy': place.calculate_voting_accuracy()
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        return render(request, 'place/place_detail.html', context)
 | 
			
		||||
@@ -204,8 +205,11 @@ class PlaceVisitDeleteView(IsAuthenticatedMixin, View):
 | 
			
		||||
class PlaceVoteView(IsEligibleToSeePlaceMixin, View):
 | 
			
		||||
    delta = timedelta(weeks=24)
 | 
			
		||||
    
 | 
			
		||||
    def get_place(self):
 | 
			
		||||
        return get_object_or_404(Place, pk=self.kwargs['place_id'])
 | 
			
		||||
 | 
			
		||||
    def get(self, request, place_id, vote):
 | 
			
		||||
        place = get_object_or_404(Place, id=place_id)
 | 
			
		||||
        place = self.get_place()
 | 
			
		||||
        explorer = request.user.explorer
 | 
			
		||||
        
 | 
			
		||||
        voting = PlaceVoting.objects.filter(
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user