class Meta(v0_1.CustomResourceMeta): authentication = RequirePermissionAuthentication( Permissions.edit_commcare_users) list_allowed_methods = ['get'] detail_allowed_methods = ['get'] object_class = object resource_name = 'bulk-user'
class Meta(CustomResourceMeta): authentication = RequirePermissionAuthentication( Permissions.edit_commcare_users) object_class = Group list_allowed_methods = ['get'] detail_allowed_methods = ['get'] resource_name = 'group'
class Meta(CustomResourceMeta): authentication = RequirePermissionAuthentication( Permissions.view_reports) object_class = ReportDataSource resource_name = 'report' detail_uri_name = 'slug' allowed_methods = ['get'] collection_name = 'reports'
class Meta: queryset = DeviceReportEntry.objects.all() list_allowed_methods = ['get'] detail_allowed_methods = ['get'] resource_name = 'device-log' authentication = RequirePermissionAuthentication(Permissions.edit_data) authorization = DomainAuthorization() paginator_class = NoCountingPaginator filtering = { # this is needed for the domain filtering but any values passed in via the URL get overridden "domain": ('exact', ), "date": ('exact', 'gt', 'gte', 'lt', 'lte', 'range'), "user_id": ('exact', ), "username": ('exact', ), "type": ('exact', ), "xform_id": ('exact', ), "device_id": ('exact', ), }
class Meta: queryset = StockTransaction.objects.all() list_allowed_methods = ['get'] detail_allowed_methods = ['get'] resource_name = 'stock_transaction' authentication = RequirePermissionAuthentication( Permissions.view_reports) paginator_class = NoCountingPaginator authorization = DomainAuthorization(domain_key='report__domain') filtering = { "case_id": ('exact', ), "section_id": ('exact'), } fields = [ 'product_id', 'type', 'section_id', 'quantity', 'stock_on_hand' ] include_resource_uri = False
class Meta(CustomResourceMeta): authentication = RequirePermissionAuthentication(Permissions.edit_apps) object_class = Application list_allowed_methods = ['get'] detail_allowed_methods = ['get'] resource_name = 'application'
class Meta(CustomResourceMeta): authentication = RequirePermissionAuthentication(Permissions.edit_apps) object_class = FixtureDataItem resource_name = 'fixture' limit = 0
class Meta(CustomResourceMeta): authentication = RequirePermissionAuthentication(Permissions.edit_data) object_class = CommCareCase resource_name = 'case' list_allowed_methods = ['get'] detail_allowed_methods = ['get']