Esempio n. 1
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
Esempio n. 2
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
Esempio n. 3
0
 class Meta:
     queryset = Points.objects.all().order_by('-date')
     allowed_methods = ['get']
     fields = ['date', 'description', 'points', 'type']
     resource_name = 'points'
     include_resource_uri = False
     authentication = ApiKeyAuthentication()
     authorization = ReadOnlyAuthorization()
     serializer = PrettyJSONSerializer()
     always_return_data = True
Esempio n. 4
0
 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
Esempio n. 5
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()
Esempio n. 6
0
 class Meta:
     resource_name = "feedbacks"
     queryset = Feedback.objects.all()
     authorization = Authorization()
     serializer = PrettyJSONSerializer()
     always_return_data = True