class Meta: resource_name = 'location' detail_uri_name = 'location_id' queryset = SQLLocation.objects.filter(is_archived=False).all() authentication = DomainAdminAuthentication() allowed_methods = ['get'] fields = [ 'id', 'name', 'domain', 'location_id', 'site_code', 'external_id', 'created_at', 'last_modified', 'latitude', 'longitude', ] filtering = { 'domain': ['exact'], 'site_code': ['exact'], 'external_id': ['exact'], 'created_at': ALL, 'last_modified': ALL, 'latitude': ALL, 'longitude': ALL, }
class Meta: resource_name = 'location_type' queryset = LocationType.objects.all() authentication = DomainAdminAuthentication() fields = [ 'id', 'domain', 'name', 'code', 'parent_type', 'administrative', 'shares_cases', 'view_descendants', ] filtering = { "domain": ('exact', ), }
class Meta(CustomResourceMeta): authentication = DomainAdminAuthentication() object_class = Repeater resource_name = 'data-forwarding' detail_allowed_methods = ['get', 'put', 'delete'] list_allowed_methods = ['get', 'post']
class Meta(CustomResourceMeta): authentication = DomainAdminAuthentication() resource_name = 'product' limit = 0