akvo.rest.views.project module
Akvo RSR is covered by the GNU Affero General Public License.
See more details in the license.txt file located at the root folder of the Akvo RSR module. For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.
- class akvo.rest.views.project.MyProjectsViewSet(**kwargs)[source]
Bases:
PublicProjectViewSetViewset providing listing of projects a user can edit.
- basename = None
- description = None
- detail = None
- get_queryset()[source]
Get the list of items for this view. This must be an iterable, and may be a queryset. Defaults to using self.queryset.
This method should always be used rather than accessing self.queryset directly, as self.queryset gets evaluated only once, and those results are cached for all subsequent requests.
You may want to override this if you need to provide different querysets depending on the incoming request.
(Eg. return a list of items that is specific to the user)
- name = None
- project_relation = ''
- queryset
- serializer_class
alias of
ProjectMetadataSerializer
- suffix = None
- class akvo.rest.views.project.ProjectByUuidViewSet(**kwargs)[source]
Bases:
ProjectViewSet- basename = None
- description = None
- detail = None
- lookup_field = 'uuid'
- name = None
- suffix = None
- class akvo.rest.views.project.ProjectExtraViewSet(**kwargs)[source]
Bases:
ProjectViewSetViewset providing extra Project data.
Allowed parameters are: __limit__ (default 10, max 30), __partnerships__organisation__ (filter on organisation ID), and __publishingstatus__status__ (filter on publishing status)
- basename = None
- description = None
- detail = None
- max_paginate_by = 30
- name = None
- paginate_by = 10
- paginate_by_param = 'limit'
- queryset
- serializer_class
alias of
ProjectExtraSerializer
- suffix = None
- class akvo.rest.views.project.ProjectIatiExportViewSet(**kwargs)[source]
Bases:
PublicProjectViewSetLean viewset for project data, as used in the My IATI section of RSR.
- basename = None
- description = None
- detail = None
- filter_queryset(queryset)[source]
Allow custom filter for sync_owner, since this field has been replaced by the reporting org partnership.
- max_paginate_by = 50
- name = None
- paginate_by_param = 'limit'
- project_relation = ''
- queryset
- serializer_class
alias of
ProjectIatiExportSerializer
- suffix = None
- class akvo.rest.views.project.ProjectUpViewSet(**kwargs)[source]
Bases:
ProjectViewSetViewset providing extra data and limited filtering for Up in one go.
Allowed parameters are: __limit__ (default 30, max 100), __partnerships__organisation__ (filter on organisation ID), and __publishingstatus__status__ (filter on publishing status)
- basename = None
- description = None
- detail = None
- max_paginate_by = 100
- name = None
- paginate_by_param = 'limit'
- queryset
- serializer_class
alias of
ProjectUpSerializer
- suffix = None
- class akvo.rest.views.project.ProjectViewSet(**kwargs)[source]
Bases:
PublicProjectViewSetViewset providing Project data.
- basename = None
- description = None
- detail = None
- filter_queryset(queryset)[source]
Allow custom filter for sync_owner, since this field has been replaced by the reporting org partnership.
- name = None
- project_relation = ''
- queryset
- serializer_class
alias of
ProjectSerializer
- suffix = None
- akvo.rest.views.project.project_directory(request, *args, **kwargs)[source]
Return the values for various project filters.
Based on the current filters, it returns new options for all the (other) filters. This is used to generate dynamic filters.