class Meta: queryset = Course.objects.all() resource_name = 'course' allowed_methods = ['get'] excludes = ['certification_banner'] authentication = MultiAuthentication(DjangoAuthentication(), ApiKeyAuthentication()) authorization = DjangoAuthorization()
class Meta: queryset = Reservation.objects.all() resource_name = 'reservation' allowed_methods = ['get'] authentication = MultiAuthentication(DjangoAuthentication(), ApiKeyAuthentication()) authorization = DjangoAuthorization() filtering = { "asset": ('exact'), "user": ('exact'), "reserved_from": ('exact'), }
class Meta: resource_name = 'user' queryset = User.objects.all() allowed_methods = ['get'] authentication = MultiAuthentication(TeacherAuthentication(), ApiKeyAuthentication()) authorization = UserResourceAuthorization() fields = ['id', 'email', 'first_name', 'last_name'] filtering = { 'first_name': ['istartswith'], 'last_name': ['istartswith'], 'email': ('iexact') }