akvo.rest.views.indicator_period_data module

class akvo.rest.views.indicator_period_data.IndicatorPeriodDataCommentViewSet(**kwargs)[source]

Bases: PublicProjectViewSet

authentication_classes = (<class 'rest_framework.authentication.SessionAuthentication'>, <class 'akvo.rest.authentication.TastyTokenAuthentication'>, <class 'akvo.rest.authentication.JWTAuthentication'>)
basename = None
description = None
detail = None
name = None
perform_create(serializer)[source]
project_relation = 'data__period__indicator__result__project__'
queryset
serializer_class

alias of IndicatorPeriodDataCommentSerializer

suffix = None
class akvo.rest.views.indicator_period_data.IndicatorPeriodDataFrameworkViewSet(**kwargs)[source]

Bases: PublicProjectViewSet

authentication_classes = (<class 'rest_framework.authentication.SessionAuthentication'>, <class 'akvo.rest.authentication.TastyTokenAuthentication'>, <class 'akvo.rest.authentication.JWTAuthentication'>)
basename = None
description = None
detail = None
filter_queryset(queryset)[source]

Given a queryset, filter it with whichever filter backend is in use.

You are unlikely to want to override this method, although you may need to call it either from a list view, or from a custom get_object method if you want to apply the configured filtering backend to the default queryset.

get_object()[source]

Returns the object the view is displaying.

You may want to override this if you need to provide non-standard queryset lookups. Eg if objects are referenced using multiple keyword arguments in the url conf.

name = None
perform_create(serializer)[source]
perform_destroy(instance)[source]
perform_update(serializer)[source]
project_relation = 'period__indicator__result__project__'
queryset
serializer_class

alias of IndicatorPeriodDataFrameworkSerializer

suffix = None
class akvo.rest.views.indicator_period_data.IndicatorPeriodDataViewSet(**kwargs)[source]

Bases: PublicProjectViewSet

basename = None
description = None
detail = None
filter_queryset(queryset)[source]

Given a queryset, filter it with whichever filter backend is in use.

You are unlikely to want to override this method, although you may need to call it either from a list view, or from a custom get_object method if you want to apply the configured filtering backend to the default queryset.

name = None
perform_create(serializer)[source]
project_relation = 'period__indicator__result__project__'
queryset
serializer_class

alias of IndicatorPeriodDataSerializer

suffix = None
akvo.rest.views.indicator_period_data.indicator_previous_cumulative_update(request, *args, **kwargs)[source]
akvo.rest.views.indicator_period_data.indicator_upload_file(request, *args, **kwargs)[source]

Special API call for directly uploading a file.

:param request; A Django request object. :param pk; The primary key of an IndicatorPeriodData instance.

akvo.rest.views.indicator_period_data.period_update_files(request, *args, **kwargs)[source]
akvo.rest.views.indicator_period_data.period_update_photos(request, *args, **kwargs)[source]
akvo.rest.views.indicator_period_data.set_updates_status(request, *args, **kwargs)[source]

Bulk update IndicatorPeriodData.status attributes of a project.