Beispiel #1
0
 class Meta:
     queryset = Award.objects.all().order_by('-award_date')
     allowed_methods = ['get']
     resource_name = 'awards'
     include_resource_uri = False
     serializer = PrettyJSONSerializer()
     authentication = ApiKeyAuthentication()
     authorization = ReadOnlyAuthorization()
     always_return_data = True
Beispiel #2
0
 class Meta:
     queryset = Badge.objects.all()
     allowed_methods = ['get']
     resource_name = 'badges'
     include_resource_uri = False
     serializer = PrettyJSONSerializer()
     authentication = ApiKeyAuthentication()
     authorization = ReadOnlyAuthorization()
     always_return_data = True
Beispiel #3
0
 class Meta:
     queryset = SchoolCode.objects.all()
     allowed_methods = ['get']
     resource_name = 'schoolcodes'
     include_resource_uri = False
     serializer = PrettyJSONSerializer()
     json_data = serializers.serialize('json', queryset)
     authentication = ApiKeyAuthentication()
     authorization = ReadOnlyAuthorization()
     always_return_data = True
Beispiel #4
0
 class Meta:
     queryset = Tracker.objects.all()
     resource_name = 'tracker'
     allowed_methods = ['post','patch']
     detail_allowed_methods = ['post','patch']
     authentication = ApiKeyAuthentication()
     authorization = Authorization() 
     serializer = PrettyJSONSerializer()
     always_return_data = True
     fields = ['points','digest','data','tracker_date','badges','course','completed','scoring','metadata','badging']
     validation = TrackerValidation()
 class Meta:
     queryset = Response.objects.all()
     allowed_methods = ['get', 'post']
     fields = ['id', 'order', 'title', 'score']
     resource_name = 'response'
     include_resource_uri = True
     serializer = PrettyJSONSerializer()
     authentication = ApiKeyAuthentication()
     authorization = Authorization()
     validation = QuestionOwnerValidation()
     always_return_data = True