class documentation

class StatsView(LoginRequiredMixin, generics.ListAPIView): (source)

View In Hierarchy

Statistics list view

Method get_highlights Returns general statistics of harvests
Method get_total_number_beneficiaries Returns total number of beneficiary organizations
Method get_total_weight_harvest_per_beneficiary Returns total number of harvests and weight per beneficiary organization
Method get_total_weight_harvest_per_fruit Returns total number of harvests and weight per fruit
Method get_total_weight_harvest_per_neighborhood Returns total number of harvests and weight per neighborhood
Method get_total_weight_harvest_per_picker Returns total number of harvests and weight per picker
Method list Returns statistics on harvests for all seasons or a specific season
Class Variable filter_backends Undocumented
Class Variable filterset_fields Undocumented
Class Variable permission_classes Undocumented
Class Variable queryset Undocumented
Class Variable template_name Undocumented
Instance Variable harvest_queryset Undocumented
Instance Variable harvest_yield_queryset Undocumented
def get_highlights(self) -> dict[str, int]: (source)

Returns general statistics of harvests

def get_total_number_beneficiaries(self) -> int: (source)

Returns total number of beneficiary organizations

def get_total_weight_harvest_per_beneficiary(self): (source)

Returns total number of harvests and weight per beneficiary organization

def get_total_weight_harvest_per_fruit(self): (source)

Returns total number of harvests and weight per fruit

def get_total_weight_harvest_per_neighborhood(self): (source)

Returns total number of harvests and weight per neighborhood

def get_total_weight_harvest_per_picker(self): (source)

Returns total number of harvests and weight per picker

def list(self, request, format='html', *args, **kwargs) -> Response: (source)

Returns statistics on harvests for all seasons or a specific season

filter_backends = (source)

Undocumented

filterset_fields: tuple[str, ...] = (source)

Undocumented

permission_classes = (source)

Undocumented

queryset = (source)

Undocumented

template_name: str = (source)

Undocumented

harvest_queryset = (source)

Undocumented

harvest_yield_queryset = (source)

Undocumented